Commit 3af2ec1
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 15fe076
("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.
Fixes: 1da177e ("Linux-2.6.12-rc2")
Cc:[email protected]
Signed-off-by: Quang Le<[email protected]>
Signed-off-by: Willem de Bruijn<[email protected]>
Link:https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski<[email protected]>
CVE-2025-38617
(cherry picked from commit 01d3c8417b9c1b884a8a981a3b886da556512f36)
Signed-off-by: Tim Whisonant<[email protected]>
Acked-by: Bethany Jamison <[email protected]>
Acked-by: Stefan Bader <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>1 parent 381ee88 commit 3af2ec1
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4564 | 4564 | | |
4565 | 4565 | | |
4566 | 4566 | | |
4567 | | - | |
4568 | | - | |
| 4567 | + | |
| 4568 | + | |
4569 | 4569 | | |
4570 | | - | |
| 4570 | + | |
4571 | 4571 | | |
4572 | 4572 | | |
4573 | 4573 | | |
| |||
4599 | 4599 | | |
4600 | 4600 | | |
4601 | 4601 | | |
4602 | | - | |
4603 | | - | |
| 4602 | + | |
| 4603 | + | |
4604 | 4604 | | |
4605 | | - | |
| 4605 | + | |
4606 | 4606 | | |
4607 | 4607 | | |
4608 | 4608 | | |
| |||
0 commit comments