xfrm: validate selector family and prefixlen during match
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3f0ab59e6537c6a8f9e1b355b48f9c05a76e8563 · < 6d99379c58f7f1c6ab2cc7aba01a4f52d71adcfe| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xfrm: validate selector family and prefixlen during match
syzbot reported a shift-out-of-bounds in xfrm_selector_match() due to AF_UNSPEC selector with large prefixlen (e.g. 128) matched against IPv4 flow (when XFRM_STATE_AF_UNSPEC is set).
Fix this by:
- Rejecting mismatched families in xfrm_selector_match. - Returning false in addr4_match if prefixlen > 32. - Returning false in addr_match if prefixlen > 128 (prevents overflow).
From the CVE record · Linux
The Linux kernel’s xfrm selector matching can trigger a shift-out-of-bounds when an AF_UNSPEC selector with an excessive prefix length is matched against an IPv4 flow with XFRM_STATE_AF_UNSPEC set. The input does not establish how an attacker could reach this condition or whether authentication or user interaction is required.
Engineers running Linux kernels with xfrm selector matching should check their versions against the vendor advisory; affected versions are not specified.