netfilter: xt_tcpmss: check remaining length before reading optlen
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 5e13d0a37666955b6cfddc0f73cb40ed645b8a05| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: xt_tcpmss: check remaining length before reading optlen
Quoting reporter: In net/netfilter/xt_tcpmss.c (lines 53-68), the TCP option parser reads op[i+1] directly without validating the remaining option length.
If the last byte of the option field is not EOL/NOP (0/1), the code attempts to index op[i+1]. In the case where i + 1 == optlen, this causes an out-of-bounds read, accessing memory past the optlen boundary (either reading beyond the stack buffer _opt or the following payload).
From the CVE record · Linux
The Linux kernel's netfilter xt_tcpmss TCP option parser can read past the option boundary when the final option byte is neither EOL nor NOP. A crafted TCP option can trigger the out-of-bounds read; the input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with netfilter xt_tcpmss should check their installations; affected versions are not specified.