Bugzilla – Bug 1202660
VUL-0: CVE-2022-2961: kernel: race condition in rose_bind()
Last modified: 2023-03-24 13:01:07 UTC
rh#2120595 A flaw use after free in the Linux Kernel found in the Amateur Radio X.25 Packet Layer Protocol (PLP Rose). The bug is race condition inside rose_bind() function. The rose_bind() binds an sk and a given address, and then adds the sk to rose_list via rose_insert_socket(). Since there is no lock_sock() in rose_bind(), a user can call rose_bind() from two threads at the same moment, and the victim sk is possible to be added to rose_list twice. If the race is succeed, sk->sk_node.next will point to sk itself, which makes it become a cycle, and the sk's refcount is one more than the normal case. When releasing the sk, according to rose_destroy_socket(), rose_remove_socket() is called multiple times which is up to sk_has_allocations(). If sk_has_allocations() returns false the first time, sk won't be freed and cause a memory leak. Otherwise, sk is freed but can still be accessed via rose_list, which causes a use-after-free. An attacker is able to leak kernel information from /proc/net/rose* and do local privilege escalation in other ways. Tested it on Linux-5.17.rc5. References: https://bugzilla.redhat.com/show_bug.cgi?id=2120595 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-2961
I'll wait for a bit more information update.
Still no movement in the upstream...
I still do not see any related fix in net/rose/ in upstream.
No upstream development about this bug yet, unfortunately.
Is there any movement upstream, please?
Only affects kernel-*-optional packages which are shipped with Leap only.
I wonder if it would be good enough to make a comment in supported.conf. Anyone would need to touch the line if the module is moved from the -optional package. Adding also Martin Doucha into Cc. I wonder if there might be an "easy" way to catch when the "rose" module is distributed with SLES on the QA side.
(In reply to Petr Mladek from comment #18) > I wonder if it would be good enough to make a comment in supported.conf. > Anyone would need to touch the line if the module is moved from > the -optional package. Sounds like a good idea. We can mention the pending CVEs there.