CVE-2023-52637

CVE Details

Release Date:2024-04-03
Impact:Low What is this?

Description


In the Linux kernel, the following vulnerability has been resolved:\ncan: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER)\nLock jsk->sk to prevent UAF when setsockopt(..., SO_J1939_FILTER, ...)\nmodifies jsk->filters while receiving packets.\nFollowing trace was seen on affected system:\n==================================================================\nBUG: KASAN: slab-use-after-free in j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939]\nRead of size 4 at addr ffff888012144014 by task j1939/350\nCPU: 0 PID: 350 Comm: j1939 Tainted: G W OE 6.5.0-rc5 #1\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014\nCall Trace:\nprint_report+0xd3/0x620\n? kasan_complete_mode_report_info+0x7d/0x200\n? j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939]\nkasan_report+0xc2/0x100\n? j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939]\n__asan_load4+0x84/0xb0\nj1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939]\nj1939_sk_recv+0x20b/0x320 [can_j1939]\n? __kasan_check_write+0x18/0x20\n? __pfx_j1939_sk_recv+0x10/0x10 [can_j1939]\n? j1939_simple_recv+0x69/0x280 [can_j1939]\n? j1939_ac_recv+0x5e/0x310 [can_j1939]\nj1939_can_recv+0x43f/0x580 [can_j1939]\n? __pfx_j1939_can_recv+0x10/0x10 [can_j1939]\n? raw_rcv+0x42/0x3c0 [can_raw]\n? __pfx_j1939_can_recv+0x10/0x10 [can_j1939]\ncan_rcv_filter+0x11f/0x350 [can]\ncan_receive+0x12f/0x190 [can]\n? __pfx_can_rcv+0x10/0x10 [can]\ncan_rcv+0xdd/0x130 [can]\n? __pfx_can_rcv+0x10/0x10 [can]\n__netif_receive_skb_one_core+0x13d/0x150\n? __pfx___netif_receive_skb_one_core+0x10/0x10\n? __kasan_check_write+0x18/0x20\n? _raw_spin_lock_irq+0x8c/0xe0\n__netif_receive_skb+0x23/0xb0\nprocess_backlog+0x107/0x260\n__napi_poll+0x69/0x310\nnet_rx_action+0x2a1/0x580\n? __pfx_net_rx_action+0x10/0x10\n? __pfx__raw_spin_lock+0x10/0x10\n? handle_irq_event+0x7d/0xa0\n__do_softirq+0xf3/0x3f8\ndo_softirq+0x53/0x80\n\n\n__local_bh_enable_ip+0x6e/0x70\nnetif_rx+0x16b/0x180\ncan_send+0x32b/0x520 [can]\n? __pfx_can_send+0x10/0x10 [can]\n? __check_object_size+0x299/0x410\nraw_sendmsg+0x572/0x6d0 [can_raw]\n? __pfx_raw_sendmsg+0x10/0x10 [can_raw]\n? apparmor_socket_sendmsg+0x2f/0x40\n? __pfx_raw_sendmsg+0x10/0x10 [can_raw]\nsock_sendmsg+0xef/0x100\nsock_write_iter+0x162/0x220\n? __pfx_sock_write_iter+0x10/0x10\n? __rtnl_unlock+0x47/0x80\n? security_file_permission+0x54/0x320\nvfs_write+0x6ba/0x750\n? __pfx_vfs_write+0x10/0x10\n? __fget_light+0x1ca/0x1f0\n? __rcu_read_unlock+0x5b/0x280\nksys_write+0x143/0x170\n? __pfx_ksys_write+0x10/0x10\n? __kasan_check_read+0x15/0x20\n? fpregs_assert_state_consistent+0x62/0x70\n__x64_sys_write+0x47/0x60\ndo_syscall_64+0x60/0x90\n? do_syscall_64+0x6d/0x90\n? irqentry_exit+0x3f/0x50\n? exc_page_fault+0x79/0xf0\nentry_SYSCALL_64_after_hwframe+0x6e/0xd8\nAllocated by task 348:\nkasan_save_stack+0x2a/0x50\nkasan_set_track+0x29/0x40\nkasan_save_alloc_info+0x1f/0x30\n__kasan_kmalloc+0xb5/0xc0\n__kmalloc_node_track_caller+0x67/0x160\nj1939_sk_setsockopt+0x284/0x450 [can_j1939]\n__sys_setsockopt+0x15c/0x2f0\n__x64_sys_setsockopt+0x6b/0x80\ndo_syscall_64+0x60/0x90\nentry_SYSCALL_64_after_hwframe+0x6e/0xd8\nFreed by task 349:\nkasan_save_stack+0x2a/0x50\nkasan_set_track+0x29/0x40\nkasan_save_free_info+0x2f/0x50\n__kasan_slab_free+0x12e/0x1c0\n__kmem_cache_free+0x1b9/0x380\nkfree+0x7a/0x120\nj1939_sk_setsockopt+0x3b2/0x450 [can_j1939]\n__sys_setsockopt+0x15c/0x2f0\n__x64_sys_setsockopt+0x6b/0x80\ndo_syscall_64+0x60/0x90\nentry_SYSCALL_64_after_hwframe+0x6e/0xd8

See more information about CVE-2023-52637 from MITRE CVE dictionary and NIST NVD


NOTE: The following CVSS metrics and score provided are preliminary and subject to review.


CVSS v3 metrics

Base Score: 5.5
Vector String: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Version: 3.1
Attack Vector: Local
Attack Complexity: Low
Privileges Required: Low
User Interaction: None
Scope: Unchanged
Confidentiality Impact: None
Integrity Impact: None
Availability Impact: High

Errata information


PlatformErrataRelease Date
Oracle Linux version 9 (kernel)ELSA-2024-93152024-11-14


This page is generated automatically and has not been checked for errors or omissions. For clarification or corrections:

software.hardware.complete