Acknowledged
Created: Jun 18, 2025
Updated: Sep 4, 2026
Resolved Date: Jun 19, 2025
Found In Version: 10.25.33.1
Severity: Standard
Applicable for: Wind River Linux LTS 25
Component/s: Kernel
In the Linux kernel, the following vulnerability has been resolved:EOL][EOL]rxrpc: Fix locking in rxrpc's sendmsg[EOL][EOL]Fix three bugs in the rxrpc's sendmsg implementation:[EOL][EOL] (1) rxrpc_new_client_call() should release the socket lock when returning[EOL] an error from rxrpc_get_call_slot().[EOL][EOL] (2) rxrpc_wait_for_tx_window_intr() will return without the call mutex[EOL] held in the event that we're interrupted by a signal whilst waiting[EOL] for tx space on the socket or relocking the call mutex afterwards.[EOL][EOL] Fix this by: (a) moving the unlock/lock of the call mutex up to[EOL] rxrpc_send_data() such that the lock is not held around all of[EOL] rxrpc_wait_for_tx_window*() and (b) indicating to higher callers[EOL] whether we're return with the lock dropped. Note that this means[EOL] recvmsg() will not block on this call whilst we're waiting.[EOL][EOL] (3) After dropping and regaining the call mutex, rxrpc_send_data() needs[EOL] to go and recheck the state of the tx_pending buffer and the[EOL] tx_total_len check in case we raced with another sendmsg() on the same[EOL] call.[EOL][EOL]Thinking on this some more, it might make sense to have different locks for[EOL]sendmsg() and recvmsg(). There's probably no need to make recvmsg() wait[EOL]for sendmsg(). It does mean that recvmsg() can return MSG_EOR indicating[EOL]that a call is dead before a sendmsg() to that call returns - but that can[EOL]currently happen anyway.[EOL][EOL]Without fix (2), something like the following can be induced:[EOL][EOL]\tWARNING: bad unlock balance detected![EOL]\t5.16.0-rc6-syzkaller #0 Not tainted[EOL]\t-------------------------------------[EOL]\tsyz-executor011/3597 is trying to release lock (&call->user_mutex) at:[EOL]\t[<ffffffff885163a3>] rxrpc_do_sendmsg+0xc13/0x1350 net/rxrpc/sendmsg.c:748[EOL]\tbut there are no more locks to release![EOL][EOL]\tother info that might help us debug this:[EOL]\tno locks held by syz-executor011/3597.[EOL]\t...[EOL]\tCall Trace:[EOL]\t <TASK>[EOL]\t __dump_stack lib/dump_stack.c:88 [inline][EOL]\t dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106[EOL]\t print_unlock_imbalance_bug include/trace/events/lock.h:58 [inline][EOL]\t __lock_release kernel/locking/lockdep.c:5306 [inline][EOL]\t lock_release.cold+0x49/0x4e kernel/locking/lockdep.c:5657[EOL]\t __mutex_unlock_slowpath+0x99/0x5e0 kernel/locking/mutex.c:900[EOL]\t rxrpc_do_sendmsg+0xc13/0x1350 net/rxrpc/sendmsg.c:748[EOL]\t rxrpc_sendmsg+0x420/0x630 net/rxrpc/af_rxrpc.c:561[EOL]\t sock_sendmsg_nosec net/socket.c:704 [inline][EOL]\t sock_sendmsg+0xcf/0x120 net/socket.c:724[EOL]\t ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409[EOL]\t ___sys_sendmsg+0xf3/0x170 net/socket.c:2463[EOL]\t __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492[EOL]\t do_syscall_x64 arch/x86/entry/common.c:50 [inline][EOL]\t do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80[EOL]\t entry_SYSCALL_64_after_hwframe+0x44/0xae[EOL][EOL][Thanks to Hawkins Jiawei and Khalid Masum for their attempts to fix this]
CREATE(Triage):(User=lchen-cn) [CVE-2022-49998 (https://nvd.nist.gov/vuln/detail/CVE-2022-49998)