netfilter: nf_conntrack_sip: fix OOB read in sip_skip_whitespace()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ea45f12a2766dae54e5426a23e8f4bafdbe2782e · < 4be8380e3af008f418f97992c06f23be649a430d| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s nf_conntrack_sip component can read one byte past a SIP payload buffer. This occurs when a recognized header name is followed only by spaces or tabs through the exact end of the payload, without a colon. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with nf_conntrack_sip should check their affected versions; none are listed in the input.