Linux
tipc: serialize udp bearer replicast list updates
In the Linux kernel, the following vulnerability has been resolved: tipc: serialize udp bearer replicast list updates tipc_udp_rcast_add() and cleanup_bearer() both update ub->rcast.list with list_add_rcu() / list_del_rcu(), but nothing serializes them. The add runs from the encap receive softirq (via tipc_udp_rcast_disc()) without rtnl_lock(), so it can race the cleanup delete and corrupt the list: list_del corruption. prev->next should be ffff8880298d7ab8, but was ffff88802449ad38. (prev=ffff888027e3ec98) kernel BUG at lib/list_debug.c:62! RIP: __list_del_entry_valid_or_report+0x17a/0x200 Workqueue: events cleanup_bearer Call Trace: cleanup_bearer (net/tipc/udp_media.c:811) process_one_work (kernel/workqueue.c:3302) worker_thread (kernel/workqueue.c:3466) The bearer can be enabled from an unprivileged user namespace, as the TIPCv2 generic-netlink ops carry no GENL_ADMIN_PERM. Add a spinlock to struct udp_bearer and take it around the list_add_rcu() in tipc_udp_rcast_add() and the list_del_rcu() loop in cleanup_bearer() so the two writers can no longer corrupt the list. Reject a duplicate peer under the same lock before allocating, and remove tipc_udp_is_known_peer(). The old lockless pre-check in tipc_udp_rcast_disc() was racy: two softirqs discovering the same peer could both find it absent and add it twice. cleanup_bearer() runs from a workqueue after tipc_udp_disable() clears the bearer's up bit, so an encap softirq can still reach tipc_udp_rcast_add() and add a peer after cleanup_bearer() has already emptied the list, leaking that entry when the bearer is freed. Mark the bearer disabled under rcast_lock once the list is emptied and refuse further additions.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= ef20cd4dd1633987bcf46ac34ace2c8af212361f, < c148aec60ef1e806cbc9da44b3d89409df998ade
- >= ef20cd4dd1633987bcf46ac34ace2c8af212361f, < 3ff6b534d20824cddab99c81ea3bd1144e635626
- >= ef20cd4dd1633987bcf46ac34ace2c8af212361f, < 3ff143a884a19bfcf3aebd999b02274fe44f46f3
- >= ef20cd4dd1633987bcf46ac34ace2c8af212361f, < 5d3cea7d41dc72073fea6f879815c9b57c3b330d
- >= ef20cd4dd1633987bcf46ac34ace2c8af212361f, < d70c81001df9320d3445e664428a1d408b5ba896
- >= ef20cd4dd1633987bcf46ac34ace2c8af212361f, < 350e592ff4e30e48ffb55e142d11a73e63f4869c
Fixed in c148aec60ef1e806cbc9da44b3d89409df998ade, 3ff6b534d20824cddab99c81ea3bd1144e635626, 3ff143a884a19bfcf3aebd999b02274fe44f46f3, 5d3cea7d41dc72073fea6f879815c9b57c3b330d, d70c81001df9320d3445e664428a1d408b5ba896, 350e592ff4e30e48ffb55e142d11a73e63f4869c
- 4.9
Fixed in 0, 6.1.191, 6.6.160, 6.12.114, 6.18.57, 7.1.6, 7.2
Mitigation
Upgrade Linux to c148aec60ef1e806cbc9da44b3d89409df998ade or 3ff6b534d20824cddab99c81ea3bd1144e635626 or 3ff143a884a19bfcf3aebd999b02274fe44f46f3 or 5d3cea7d41dc72073fea6f879815c9b57c3b330d or d70c81001df9320d3445e664428a1d408b5ba896 or 350e592ff4e30e48ffb55e142d11a73e63f4869c or later.
Upgrade Linux to 0 or 6.1.191 or 6.6.160 or 6.12.114 or 6.18.57 or 7.1.6 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.