Linux: netfilter: nf_conntrack_sip: fix OOB read in sip_skip_whitespace()
What fixes it
- 9ae0a87e6f513293677fe286729fbae34d592215LinuxCVE List
- 0cfb96a118c5c6d46d7a1cfdfa18355ad734ca79LinuxCVE List
- 60c012b2d05e1558b0f30ea3f15a2c3ca2f24d94LinuxCVE List
- 4be8380e3af008f418f97992c06f23be649a430dLinuxCVE List
- 4a30aa2ba007db18210dd52219ecbd5528c03523LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_conntrack_sip: fix OOB read in sip_skip_whitespace()
sip_skip_whitespace() returns dptr unchanged when its own loop exhausts the buffer (dptr == limit), instead of NULL like its sibling sip_follow_continuation() returns on its own "no more data" path.
ct_sip_get_header() only checks for NULL after calling it:
dptr = sip_skip_whitespace(dptr, limit); if (dptr == NULL) break; if (*dptr != ':' || ++dptr >= limit) break;
so a recognized header name followed only by spaces/tabs running to the exact end of the SIP payload, with no colon, makes the very next statement read one byte past the buffer.
Make both "no more data" outcomes return NULL, matching the convention sip_follow_continuation() already uses and that both existing callers already check for.
Text from CVE List
Affected versions 18
- Linuxaffected: ea45f12a2766dae54e5426a23e8f4bafdbe2782e before 9ae0a87e6f513293677fe286729fbae34d592215CVE List
- Linuxaffected: ea45f12a2766dae54e5426a23e8f4bafdbe2782e before b6277622b7323000895b674321c9a1f060553188CVE List
- Linuxaffected: ea45f12a2766dae54e5426a23e8f4bafdbe2782e before 0cfb96a118c5c6d46d7a1cfdfa18355ad734ca79CVE List
- Linuxaffected: ea45f12a2766dae54e5426a23e8f4bafdbe2782e before c6beb08b1a9fdb96795816d8329ed75dd785d48eCVE List
- Linuxaffected: ea45f12a2766dae54e5426a23e8f4bafdbe2782e before 60c012b2d05e1558b0f30ea3f15a2c3ca2f24d94CVE List
- Linuxaffected: ea45f12a2766dae54e5426a23e8f4bafdbe2782e before 4be8380e3af008f418f97992c06f23be649a430dCVE List
- Linuxaffected: ea45f12a2766dae54e5426a23e8f4bafdbe2782e before 4a30aa2ba007db18210dd52219ecbd5528c03523CVE List
- Linuxaffected: ea45f12a2766dae54e5426a23e8f4bafdbe2782e before e8f8231824b5815f57ce62cba116e511b10196deCVE List
- Linuxaffected: 2.6.26CVE List
- Linuxunaffected: all versions before 2.6.26CVE List
- Linuxunaffected: 5.10.271 through 5.10.*CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.111 through 6.12.*CVE List
- Linuxunaffected: 6.18.53 through 6.18.*CVE List
- Linuxunaffected: 7.2.7 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 8
- git.kernel.org/stable/c/9ae0a87e6f513293677fe286729fbae34d592215Referencevia CVE List
- git.kernel.org/stable/c/b6277622b7323000895b674321c9a1f060553188Referencevia CVE List
- git.kernel.org/stable/c/0cfb96a118c5c6d46d7a1cfdfa18355ad734ca79Referencevia CVE List
- git.kernel.org/stable/c/c6beb08b1a9fdb96795816d8329ed75dd785d48eReferencevia CVE List
- git.kernel.org/stable/c/60c012b2d05e1558b0f30ea3f15a2c3ca2f24d94Referencevia CVE List
- git.kernel.org/stable/c/4be8380e3af008f418f97992c06f23be649a430dReferencevia CVE List
- git.kernel.org/stable/c/4a30aa2ba007db18210dd52219ecbd5528c03523Referencevia CVE List
- git.kernel.org/stable/c/e8f8231824b5815f57ce62cba116e511b10196deReferencevia CVE List