CVE-2022-49087

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
26/02/2025
Last modified:
25/03/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> rxrpc: fix a race in rxrpc_exit_net()<br /> <br /> Current code can lead to the following race:<br /> <br /> CPU0 CPU1<br /> <br /> rxrpc_exit_net()<br /> rxrpc_peer_keepalive_worker()<br /> if (rxnet-&gt;live)<br /> <br /> rxnet-&gt;live = false;<br /> del_timer_sync(&amp;rxnet-&gt;peer_keepalive_timer);<br /> <br /> timer_reduce(&amp;rxnet-&gt;peer_keepalive_timer, jiffies + delay);<br /> <br /> cancel_work_sync(&amp;rxnet-&gt;peer_keepalive_work);<br /> <br /> rxrpc_exit_net() exits while peer_keepalive_timer is still armed,<br /> leading to use-after-free.<br /> <br /> syzbot report was:<br /> <br /> ODEBUG: free active (active state 0) object type: timer_list hint: rxrpc_peer_keepalive_timeout+0x0/0xb0<br /> WARNING: CPU: 0 PID: 3660 at lib/debugobjects.c:505 debug_print_object+0x16e/0x250 lib/debugobjects.c:505<br /> Modules linked in:<br /> CPU: 0 PID: 3660 Comm: kworker/u4:6 Not tainted 5.17.0-syzkaller-13993-g88e6c0207623 #0<br /> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011<br /> Workqueue: netns cleanup_net<br /> RIP: 0010:debug_print_object+0x16e/0x250 lib/debugobjects.c:505<br /> Code: ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 af 00 00 00 48 8b 14 dd 00 1c 26 8a 4c 89 ee 48 c7 c7 00 10 26 8a e8 b1 e7 28 05 0b 83 05 15 eb c5 09 01 48 83 c4 18 5b 5d 41 5c 41 5d 41 5e c3<br /> RSP: 0018:ffffc9000353fb00 EFLAGS: 00010082<br /> RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000<br /> RDX: ffff888029196140 RSI: ffffffff815efad8 RDI: fffff520006a7f52<br /> RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000<br /> R10: ffffffff815ea4ae R11: 0000000000000000 R12: ffffffff89ce23e0<br /> R13: ffffffff8a2614e0 R14: ffffffff816628c0 R15: dffffc0000000000<br /> FS: 0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000<br /> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033<br /> CR2: 00007fe1f2908924 CR3: 0000000043720000 CR4: 00000000003506f0<br /> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000<br /> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400<br /> Call Trace:<br /> <br /> __debug_check_no_obj_freed lib/debugobjects.c:992 [inline]<br /> debug_check_no_obj_freed+0x301/0x420 lib/debugobjects.c:1023<br /> kfree+0xd6/0x310 mm/slab.c:3809<br /> ops_free_list.part.0+0x119/0x370 net/core/net_namespace.c:176<br /> ops_free_list net/core/net_namespace.c:174 [inline]<br /> cleanup_net+0x591/0xb00 net/core/net_namespace.c:598<br /> process_one_work+0x996/0x1610 kernel/workqueue.c:2289<br /> worker_thread+0x665/0x1080 kernel/workqueue.c:2436<br /> kthread+0x2e9/0x3a0 kernel/kthread.c:376<br /> ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298<br />

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.17 (including) 4.19.238 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.4.189 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.111 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.34 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 5.16.20 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.17 (including) 5.17.3 (excluding)
cpe:2.3:o:linux:linux_kernel:5.18:rc1:*:*:*:*:*:*