Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2023-52523— bpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于内核空指针取消引用。

CVSS 7.8 · High EPSS 0.24% · P13

Affected Version Matrix 10

VendorProduct Version RangeStatus
Linux Linux 122e6c79efe1c25816118aca9cfabe54e99c2432< bc8b89b6963803a123f64aa9494155a037b3d728 affected
122e6c79efe1c25816118aca9cfabe54e99c2432< b8f97e47b6fb84fcf2f5a22e725eefb6cf5070c2 affected
122e6c79efe1c25816118aca9cfabe54e99c2432< ded6e448028f0f91b6af35985afca01fa02a9089 affected
122e6c79efe1c25816118aca9cfabe54e99c2432< b80e31baa43614e086a9d29dc1151932b1bd7fc5 affected
5.13 affected
< 5.13 unaffected
5.15.135≤ 5.15.* unaffected
6.1.57≤ 6.1.* unaffected
… +2 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2023-52523

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
bpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: bpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets With a SOCKMAP/SOCKHASH map and an sk_msg program user can steer messages sent from one TCP socket (s1) to actually egress from another TCP socket (s2): tcp_bpf_sendmsg(s1) // = sk_prot->sendmsg tcp_bpf_send_verdict(s1) // __SK_REDIRECT case tcp_bpf_sendmsg_redir(s2) tcp_bpf_push_locked(s2) tcp_bpf_push(s2) tcp_rate_check_app_limited(s2) // expects tcp_sock tcp_sendmsg_locked(s2) // ditto There is a hard-coded assumption in the call-chain, that the egress socket (s2) is a TCP socket. However in commit 122e6c79efe1 ("sock_map: Update sock type checks for UDP") we have enabled redirects to non-TCP sockets. This was done for the sake of BPF sk_skb programs. There was no indention to support sk_msg send-to-egress use case. As a result, attempts to send-to-egress through a non-TCP socket lead to a crash due to invalid downcast from sock to tcp_sock: BUG: kernel NULL pointer dereference, address: 000000000000002f ... Call Trace: <TASK> ? show_regs+0x60/0x70 ? __die+0x1f/0x70 ? page_fault_oops+0x80/0x160 ? do_user_addr_fault+0x2d7/0x800 ? rcu_is_watching+0x11/0x50 ? exc_page_fault+0x70/0x1c0 ? asm_exc_page_fault+0x27/0x30 ? tcp_tso_segs+0x14/0xa0 tcp_write_xmit+0x67/0xce0 __tcp_push_pending_frames+0x32/0xf0 tcp_push+0x107/0x140 tcp_sendmsg_locked+0x99f/0xbb0 tcp_bpf_push+0x19d/0x3a0 tcp_bpf_sendmsg_redir+0x55/0xd0 tcp_bpf_send_verdict+0x407/0x550 tcp_bpf_sendmsg+0x1a1/0x390 inet_sendmsg+0x6a/0x70 sock_sendmsg+0x9d/0xc0 ? sockfd_lookup_light+0x12/0x80 __sys_sendto+0x10e/0x160 ? syscall_enter_from_user_mode+0x20/0x60 ? __this_cpu_preempt_check+0x13/0x20 ? lockdep_hardirqs_on+0x82/0x110 __x64_sys_sendto+0x1f/0x30 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Reject selecting a non-TCP sockets as redirect target from a BPF sk_msg program to prevent the crash. When attempted, user will receive an EACCES error from send/sendto/sendmsg() syscall.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于内核空指针取消引用。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 122e6c79efe1c25816118aca9cfabe54e99c2432 ~ bc8b89b6963803a123f64aa9494155a037b3d728 -
Linux Linux 5.13 -

II. Public POCs for CVE-2023-52523

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2023-52523

请登录查看更多情报信息。

Other References for CVE-2023-52523 (3)

Same Patch Batch · Linux · 2024-03-02 · 57 CVEs total

CVE-2023-52515 9.8 CRITICAL RDMA/srp: Do not call scsi_done() from srp_abort()
CVE-2023-52522 8.8 HIGH net: fix possible store tearing in neigh_periodic_work()
CVE-2023-52530 8.8 HIGH wifi: mac80211: fix potential key use-after-free
CVE-2023-52502 8.8 HIGH net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn()
CVE-2024-26621 8.2 HIGH mm: huge_memory: don't force huge page alignment on 32 bit
CVE-2023-52509 7.8 HIGH ravb: Fix use-after-free issue in ravb_tx_timeout_work()
CVE-2023-52572 7.8 HIGH cifs: Fix UAF in cifs_demultiplex_thread()
CVE-2023-52574 7.8 HIGH team: fix null-ptr-deref when team device type is changed
CVE-2023-52517 7.8 HIGH spi: sun6i: fix race between DMA RX transfer completion and RX FIFO drain
CVE-2023-52503 7.8 HIGH tee: amdtee: fix use-after-free vulnerability in amdtee_close_session
CVE-2023-52513 7.5 HIGH RDMA/siw: Fix connection failure handling
CVE-2023-52565 7.1 HIGH media: uvcvideo: Fix OOB read
CVE-2023-52559 iommu/vt-d: Avoid memory allocation in iommu_suspend()
CVE-2023-52563 drm/meson: fix memory leak on ->hpd_notify callback
CVE-2023-52561 arm64: dts: qcom: sdm845-db845c: Mark cont splash memory region as reserved
CVE-2023-52560 mm/damon/vaddr-test: fix memory leak in damon_do_test_apply_three_regions()
CVE-2023-52582 netfs: Only call folio_start_fscache() one time for each folio
CVE-2023-52566 nilfs2: fix potential use after free in nilfs_gccache_submit_read_data()
CVE-2023-52562 mm/slab_common: fix slab_caches list corruption after kmem_cache_destroy()
CVE-2023-52518 Bluetooth: hci_codec: Fix leaking content of local_codecs

Showing top 20 of 57 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2023-52523

No comments yet


Leave a comment