CVE-2024-44934: net: bridge: mcast: wait for previous gc cycles when removing port
In the Linux kernel, the following vulnerability has been resolved:
net: bridge: mcast: wait for previous gc cycles when removing port
syzbot hit a use-after-free[1] which is caused because the bridge doesn't make sure that all previous garbage has been collected when removing a port. What happens is: CPU 1 CPU 2 start gc cycle remove port acquire gc lock first wait for lock call brmulticasggc() directly acquire lock now but free port the port can be freed while grp timers still running
Make sure all previous gc cycles have finished by using flushwork before freeing the port.
[1] BUG: KASAN: slab-use-after-free in brmulticastportgroupexpired+0x4c0/0x550 net/bridge/brmulticast.c:861 Read of size 8 at addr ffff888071d6d000 by task syz.5.1232/9699
CPU: 1 PID: 9699 Comm: syz.5.1232 Not tainted 6.10.0-rc5-syzkaller-00021-g24ca36a562d6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: <IRQ> dumpstack lib/dumpstack.c:88 [inline] dumpstacklvl+0x116/0x1f0 lib/dumpstack.c:114 printaddressdescription mm/kasan/report.c:377 [inline] printreport+0xc3/0x620 mm/kasan/report.c:488 kasanreport+0xd9/0x110 mm/kasan/report.c:601 brmulticastportgroupexpired+0x4c0/0x550 net/bridge/brmulticast.c:861 calltimerfn+0x1a3/0x610 kernel/time/timer.c:1792 expiretimers kernel/time/timer.c:1843 [inline] runtimers+0x74b/0xaf0 kernel/time/timer.c:2417 runtimerbase kernel/time/timer.c:2428 [inline] runtimerbase kernel/time/timer.c:2421 [inline] runtimerbase+0x111/0x190 kernel/time/timer.c:2437
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Compensating control
If you are running a Linux kernel version that includes the affected bridge multicast code, apply the described mitigation change in net/bridge/br_multicast.c: when removing a port, make sure all previous garbage-collection (gc) cycles have finished by using flush_work before freeing the port.
Event History
Frequently Asked Questions
What is the severity of CVE-2024-44934?
CVE-2024-44934 is classified as a medium severity vulnerability affecting the Linux kernel.
How can I fix CVE-2024-44934?
To remedy CVE-2024-44934, update to the latest kernel versions provided, such as 6.1.123-1 or 6.12.11-1.
Which software versions are affected by CVE-2024-44934?
CVE-2024-44934 affects several Linux kernel versions prior to 6.1.123-1 and those between 5.10.223-1 and 5.10.226-1.
What type of vulnerability is CVE-2024-44934?
CVE-2024-44934 is a use-after-free vulnerability related to the Linux network bridge.
Is CVE-2024-44934 present in older Linux kernel versions?
Yes, CVE-2024-44934 is present in earlier versions of the Linux kernel, particularly those below 6.1.123-1.