net/packet: fix a race in packet_set_ring() and packet_notifier()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < f2e8fcfd2b1bc754920108b7f2cd75082c5a18df| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/packet: fix a race in packet_set_ring() and packet_notifier()
When packet_set_ring() releases po->bind_lock, another thread can run packet_notifier() and process an NETDEV_UP event.
This race and the fix are both similar to that of commit 15fe076edea7 ("net/packet: fix a race in packet_bind() and packet_notifier()").
There too the packet_notifier NETDEV_UP event managed to run while a po->bind_lock critical section had to be temporarily released. And the fix was similarly to temporarily set po->num to zero to keep the socket unhooked until the lock is retaken.
The po->bind_lock in packet_set_ring and packet_notifier precede the introduction of git history.
From the CVE record · Linux
A race exists between packet_set_ring() and packet_notifier() when packet_set_ring() temporarily releases po->bind_lock. Another thread can process a NETDEV_UP event during that window. The input does not specify the security impact or whether exploitation requires local access, authentication, or user interaction.
Engineers running the Linux kernel should check their versions; affected versions are not specified.