netfilter: nfnetlink_osf: fix potential NULL dereference in ttl check
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 11eeef41d5f63c7d2f7fdfcc733eb7fb137cc384 · < 79b90a96688e521771fa6ed3dc7864b76b8df293| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nfnetlink_osf: fix potential NULL dereference in ttl check
The nf_osf_ttl() function accessed skb->dev to perform a local interface address lookup without verifying that the device pointer was valid.
Additionally, the implementation utilized an in_dev_for_each_ifa_rcu loop to match the packet source address against local interface addresses. It assumed that packets from the same subnet should not see a decrement on the initial TTL. A packet might appear it is from the same subnet but it actually isn't especially in modern environments with containers and virtual switching.
Remove the device dereference and interface loop. Replace the logic with a switch statement that evaluates the TTL according to the ttl_check.
From the CVE record · Linux
The Linux kernel's nfnetlink_osf TTL check can dereference a missing packet device pointer. A packet reaching this check without a valid device pointer could trigger a NULL dereference. The input does not specify whether authentication or user interaction is needed.
Engineers running Linux kernels with nfnetlink_osf should check their versions; affected versions are not specified.