CVE-2026-68338: net/packet: avoid fanout hook re-registration after unregister
In the Linux kernel, the following vulnerability has been resolved:
net/packet: avoid fanout hook re-registration after unregister
packetsetring() temporarily detaches a socket from packet delivery while reconfiguring its ring. It records the previous running state, clears po->num, unregisters the protocol hook when needed, drops po->bindlock, and later restores po->num and re-registers the hook from the saved wasrunning value.
That unlocked window can race with NETDEVUNREGISTER. The notifier can observe the socket as not running, skip unregisterprothook(), and invalidate the per-socket binding by setting po->ifindex to -1 and clearing po->prothook.dev. A one-member fanout group can still retain its shared fanout hook device pointer. When packetsetring() resumes, re-registering solely from the stale wasrunning state can re-add the fanout hook after the device has been unregistered.
Treat po->ifindex == -1 as an invalidated binding after reacquiring po->bindlock. This is distinct from ifindex 0, the normal unbound/wildcard state: ifindex -1 marks an existing device binding that was invalidated when the device was unregistered. Restore po->num as before, but do not re-register the hook if device unregister already detached the socket.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
When invalidating a per-socket binding after a device unregistration, set po->ifindex to -1 (the stale was_running state alone must not cause re-registration), and ensure the fanout hook re-registration is skipped if the device has already been unregistered.
Linux kernel packet fanout hook po->ifindex = -1
Event History
Frequently Asked Questions
What is the severity of CVE-2026-68338?
CVE-2026-68338 has a risk score of 27, indicating a significant level of concern.
How do I fix CVE-2026-68338?
To fix CVE-2026-68338, update the Linux kernel to the latest version that addresses this vulnerability.
What impact does CVE-2026-68338 have on system security?
CVE-2026-68338 can lead to improper socket behavior, potentially allowing unauthorized packet handling.
Which version of the Linux kernel is affected by CVE-2026-68338?
CVE-2026-68338 affects specific versions of the Linux kernel prior to the security patch being applied.
Has CVE-2026-68338 been publicly disclosed?
Yes, CVE-2026-68338 was published on August 10, 2026, providing details about the vulnerability.