⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287632 in webkit


Ignore:
Timestamp:
Jan 5, 2022, 10:21:20 AM (5 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r287313. rdar://problem/87124922

IPC streams should not accept 0-length stream buffers
​https://bugs.webkit.org/show_bug.cgi?id=234552
<rdar://79725420>

Patch by Kimmo Kinnunen <​kkinnunen@apple.com> on 2021-12-21
Reviewed by Antti Koivisto.

Make decoding 0-length stream buffers fail. These buffers are not useful.

No new tests, tests need additional implementation, will be added
in subsequent commits.

  • Platform/IPC/StreamConnectionBuffer.cpp: (IPC::StreamConnectionBuffer::StreamConnectionBuffer): (IPC::StreamConnectionBuffer::decode):

git-svn-id: ​https://svn.webkit.org/repository/webkit/trunk@287313 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-612-branch/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612-branch/Source/WebKit/ChangeLog

    r287628 r287632  
     12022-01-05  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r287313. rdar://problem/87124922
     4
     5    IPC streams should not accept 0-length stream buffers
     6    https://bugs.webkit.org/show_bug.cgi?id=234552
     7    <rdar://79725420>
     8   
     9    Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-12-21
     10    Reviewed by Antti Koivisto.
     11   
     12    Make decoding 0-length stream buffers fail. These buffers are not useful.
     13   
     14    No new tests, tests need additional implementation, will be added
     15    in subsequent commits.
     16   
     17    * Platform/IPC/StreamConnectionBuffer.cpp:
     18    (IPC::StreamConnectionBuffer::StreamConnectionBuffer):
     19    (IPC::StreamConnectionBuffer::decode):
     20   
     21    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     22
     23    2021-12-21  Kimmo Kinnunen  <kkinnunen@apple.com>
     24
     25            IPC streams should not accept 0-length stream buffers
     26            https://bugs.webkit.org/show_bug.cgi?id=234552
     27            <rdar://79725420>
     28
     29            Reviewed by Antti Koivisto.
     30
     31            Make decoding 0-length stream buffers fail. These buffers are not useful.
     32
     33            No new tests, tests need additional implementation, will be added
     34            in subsequent commits.
     35
     36            * Platform/IPC/StreamConnectionBuffer.cpp:
     37            (IPC::StreamConnectionBuffer::StreamConnectionBuffer):
     38            (IPC::StreamConnectionBuffer::decode):
     39
    1402022-01-05  Russell Epstein  <repstein@apple.com>
    241
  • branches/safari-612-branch/Source/WebKit/Platform/IPC/StreamConnectionBuffer.cpp

    r278253 r287632  
    4343    , m_sharedMemory(createMemory(memorySize))
    4444{
     45    ASSERT(m_dataSize > 0);
    4546    ASSERT(m_dataSize <= maximumSize());
    4647}
    … …  
    5152    , m_clientWaitSemaphore(WTFMove(clientWaitSemaphore))
    5253{
     54    ASSERT(m_dataSize > 0);
    5355    ASSERT(m_dataSize <= maximumSize());
    5456}
    … …  
    8991        return std::nullopt;
    9092    size_t dataSize = static_cast<size_t>(ipcHandle->dataSize);
    91     if (dataSize < headerSize())
     93    if (dataSize <= headerSize())
    9294        return std::nullopt;
    9395    if (dataSize > headerSize() + maximumSize())
Note: See TracChangeset for help on using the changeset viewer.