cve.bz

CVE-2023-52885 linux linux kernel: Use After Free

7.8 highEPSS 0.6%Fix available

High (7.8) in linux linux kernel. EPSS 0.6% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: SUNRPC: Fix UAF in svc_tcp_listen_data_ready() After the listener svc_sock is freed, and before invoking svc_tcp_accept() for the established child sock, there is a window that the newsock retaining a freed listener svc_sock in sk_user_data which cloning from parent. In the race window, if data is received on the newsock, we will observe use-after-free report in svc_tcp_listen_data_ready(). Reproduce by two tasks: 1. while :; do rpc.nfsd 0 ; rpc.nfsd; done 2. while :; do echo "" | ncat -4 127.0.0.1 2049 ; done KASAN report: ================================================================== BUG: KASAN: slab-use-after-free in svc_tcp_listen_data_ready+0x1cf/0x1f0 [sunrpc] Read of size 8 at addr ffff888139d96228 by task nc/102553 CPU: 7 PID: 102553 Comm: nc Not tainted 6.3.0+ #18 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020 Call Trace: <IRQ> dump_stack_lvl+0x33/0x50 print_address_description.constprop.0+0x27/0x310 print_report+0x3e/0x70 kasan_report+0xae/0xe0 svc_tcp_listen_data_ready+0x1cf/0x1f0 [sunrpc] tcp_data_queue+0x9f4/0x20e0 tcp_rcv_established+0x666/0x1f60 tcp_v4_do_rcv+0x51c/0x850 tcp_v4_rcv+0x23fc/0x2e80 ip_protocol_deliver_rcu+0x62/0x300 ip_local_deliver_finish+0x267/0x350 ip_local_deliver+0x18b/0x2d0 ip_rcv+0x2fb/0x370 __netif_receive_skb_one_core+0x166/0x1b0 process_backlog+0x24c/0x5e0 __napi_poll+0xa2/0x500 net_rx_action+0x854/0xc90 __do_softirq+0x1bb/0x5de do_softirq+0xcb/0x100 </IRQ> <TASK> ... </TASK> Allocated by task 102371: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 __kasan_kmalloc+0x7b/0x90 svc_setup_socket+0x52/0x4f0 [sunrpc] svc_addsock+0x20d/0x400 [sunrpc] __write_ports_addfd+0x209/0x390 [nfsd] write_ports+0x239/0x2c0 [nfsd] nfsctl_transaction_write+0xac/0x110 [nfsd] vfs_write+0x1c3/0xae0 ksys_write+0xed/0x1c0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Freed by task 102551: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 kasan_save_free_info+0x2a/0x50 __kasan_slab_free+0x106/0x190 __kmem_cache_free+0x133/0x270 svc_xprt_free+0x1e2/0x350 [sunrpc] svc_xprt_destroy_all+0x25a/0x440 [sunrpc] nfsd_put+0x125/0x240 [nfsd] nfsd_svc+0x2cb/0x3c0 [nfsd] write_threads+0x1ac/0x2a0 [nfsd] nfsctl_transaction_write+0xac/0x110 [nfsd] vfs_write+0x1c3/0xae0 ksys_write+0xed/0x1c0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Fix the UAF by simply doing nothing in svc_tcp_listen_data_ready() if state != TCP_LISTEN, that will avoid dereferencing svsk for all child socket.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 47th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2024-09-10. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-52885 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-52885?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-52885?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-52885 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux4.8 and later

Fixed in

ProductRelease lineFixed in
Linux4.144.14.322
Linux4.194.19.291
Linux5.45.4.251
Linux5.105.10.188
Linux5.155.15.121
Linux6.16.1.39
Linux6.46.4.4
Linuxlater releases6.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linux6.1.52-1DEBIAN-CVE-2023-52885
Debian13, 14linux6.4.4-1DEBIAN-CVE-2023-52885
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2023-52885
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2023-52885
Ubuntu20.04:LTSlinux5.4.0-166.183UBUNTU-CVE-2023-52885
Ubuntu20.04:LTSlinux-aws5.4.0-1113.123UBUNTU-CVE-2023-52885
Ubuntu20.04:LTSlinux-aws-5.155.15.0-1047.52~20.04.1UBUNTU-CVE-2023-52885
Ubuntu20.04:LTSlinux-azure5.4.0-1119.126UBUNTU-CVE-2023-52885
Ubuntu20.04:LTSlinux-azure-5.155.15.0-1049.56~20.04.1UBUNTU-CVE-2023-52885
Ubuntu20.04:LTSlinux-bluefield5.4.0-1074.80UBUNTU-CVE-2023-52885
Ubuntu20.04:LTSlinux-gcp5.4.0-1117.126UBUNTU-CVE-2023-52885
Ubuntu20.04:LTSlinux-gcp-5.155.15.0-1044.52~20.04.1UBUNTU-CVE-2023-52885
Ubuntu20.04:LTSlinux-gke, linux-riscv, linux-raspi2 and 24 moreno fix listedUBUNTU-CVE-2023-52885
Ubuntu20.04:LTSlinux-gkeop5.4.0-1080.84UBUNTU-CVE-2023-52885
85 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatrhel_aus:8.6::baseos, rhel_tus:8.6::baseosperf, kernel, bpftool and 21 more0:4.18.0-372.118.1.el8_6RHSA-2024:5281
Red Hatrhel_e4s:8.6::baseosperf, kernel, bpftool and 30 more0:4.18.0-372.118.1.el8_6RHSA-2024:5281
Red Hatrhel_eus:9.2::appstreamperf, rtla, kernel-devel and 21 more0:5.14.0-284.77.1.el9_2RHSA-2024:5066
Red Hatrhel_eus:9.2::appstream, rhel_eus:9.2::crbbpftool-debuginfo0:7.0.0-284.77.1.el9_2RHSA-2024:5066
Red Hatrhel_eus:9.2::baseosbpftool, bpftool-debuginfo0:7.0.0-284.77.1.el9_2RHSA-2024:5066
Red Hatrhel_eus:9.2::baseoskernel, kernel-64k, kernel-core and 40 more0:5.14.0-284.77.1.el9_2RHSA-2024:5066
Red Hatrhel_eus:9.2::crbperf-debuginfo, kernel-debuginfo, kernel-64k-debuginfo and 10 more0:5.14.0-284.77.1.el9_2RHSA-2024:5066
Red Hatrhel_eus:9.2::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 14 more0:5.14.0-284.77.1.rt14.362.el9_2RHSA-2024:5067
Red Hatrhel_eus:9.2::realtimekernel-rt, kernel-rt-core, kernel-rt-debug and 12 more0:5.14.0-284.77.1.rt14.362.el9_2RHSA-2024:5067
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-64kb, kernel-syms, kernel-source and 3 more5.3.18-150300.59.170.1SUSE-SU-2024:2948-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Micro 5.1 and 3 morekernel-default-base5.3.18-150300.59.170.1.150300.18.100.1SUSE-SU-2024:2948-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Server 15 SP3-LTSS and 1 morekernel-docs5.3.18-150300.59.170.2SUSE-SU-2024:2948-1
SUSELinux Enterprise High Availability Extension 12 SP5, Linux Enterprise Live Patching 12 SP5, Linux Enterprise Workstation Extension 12 SP5kernel-default4.12.14-122.225.1SUSE-SU-2024:2940-1
SUSELinux Enterprise High Availability Extension 15 SP2, Linux Enterprise Live Patching 15 SP2kernel-default5.3.18-150200.24.200.1SUSE-SU-2024:2923-1
SUSELinux Enterprise High Availability Extension 15 SP3, Linux Enterprise Live Patching 15 SP3, Linux Enterprise Micro 5.1 and 1 morekernel-default5.3.18-150300.59.170.1SUSE-SU-2024:2948-1
SUSELinux Enterprise High Availability Extension 15 SP4, Linux Enterprise Live Patching 15 SP4, Linux Enterprise Micro 5.3 and 1 morekernel-default5.14.21-150400.24.128.1SUSE-SU-2024:2929-1
SUSELinux Enterprise High Availability Extension 15 SP5, Linux Enterprise Live Patching 15 SP5, Linux Enterprise Micro 5.5 and 2 morekernel-default5.14.21-150500.55.73.1SUSE-SU-2024:2939-1
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6, Linux Enterprise Module for Legacy 15 SP6 and 1 morekernel-default6.4.0-150600.23.22.1SUSE-SU-2024:3383-1
SUSELinux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise Server 15 SP2-LTSS, Linux Enterprise Server for SAP Applications 15 SP2kernel-default-base5.3.18-150200.24.200.1.150200.9.103.1SUSE-SU-2024:2923-1
SUSELinux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise Server 15 SP2-LTSS, Linux Enterprise Server for SAP Applications 15 SP2kernel-docs, kernel-syms, kernel-source and 3 more5.3.18-150200.24.200.1SUSE-SU-2024:2923-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSSkernel-64kb, kernel-docs, kernel-syms and 3 more5.14.21-150400.24.128.1SUSE-SU-2024:2929-1
43 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.5dtb-aarch64, kernel-64kb, kernel-syms and 7 more5.14.21-150500.55.73.1SUSE-SU-2024:2939-1
openSUSELeap 15.5kernel-azure, kernel-syms-azure, kernel-source-azure5.14.21-150500.33.63.1SUSE-SU-2024:2947-1
openSUSELeap 15.5kernel-docs5.14.21-150500.55.73.2SUSE-SU-2024:2939-1
openSUSELeap 15.5kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more5.14.21-150500.13.64.1SUSE-SU-2024:2894-1
openSUSELeap 15.5, Leap Micro 5.5kernel-default-base5.14.21-150500.55.73.1.150500.6.33.8SUSE-SU-2024:2939-1
openSUSELeap 15.6dtb-aarch64, kernel-64kb, kernel-docs and 8 more6.4.0-150600.23.22.1SUSE-SU-2024:3383-1
openSUSELeap 15.6kernel-azure, kernel-syms-azure, kernel-source-azure6.4.0-150600.8.11.1SUSE-SU-2024:3194-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.22.1.150600.12.8.3SUSE-SU-2024:3383-1
openSUSELeap 15.6kernel-rt, kernel-rt_debug, kernel-source-rt6.4.0-150600.10.8.3SUSE-SU-2024:3195-1
openSUSELeap 15.6kernel-syms-rt6.4.0-150600.10.8.1SUSE-SU-2024:3195-1
openSUSELeap Micro 5.5kernel-default5.14.21-150500.55.73.1SUSE-SU-2024:2939-1
openSUSELeap Micro 5.5kernel-rt5.14.21-150500.13.64.1SUSE-SU-2024:2894-1
Alpaquita23linux-lts6.1.42-r0BELL-CVE-2023-52885
Alpaquitastreamlinux-lts6.6.58-r0BELL-CVE-2023-52885

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is rated as a moderate severity due to its potential to disrupt service through crashes where the use-after-free allows for exploitation under specific conditions.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportkernel-0:4.18.0-372.118.1.el8_6Fixed 2024-08-13RHSA-2024:5281
Red Hat Enterprise Linux 8.6 Telecommunications Update Servicekernel-0:4.18.0-372.118.1.el8_6Fixed 2024-08-13RHSA-2024:5281
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutionskernel-0:4.18.0-372.118.1.el8_6Fixed 2024-08-13RHSA-2024:5281
Red Hat Enterprise Linux 9.2 Extended Update Supportkernel-0:5.14.0-284.77.1.el9_2Fixed 2024-08-07RHSA-2024:5066
Red Hat Enterprise Linux 9.2 Extended Update Supportkernel-rt-0:5.14.0-284.77.1.rt14.362.el9_2Fixed 2024-08-07RHSA-2024:5067
Red Hat Enterprise Linux 6kernelOut of support scope
Red Hat Enterprise Linux 7kernelOut of support scope
Red Hat Enterprise Linux 7kernel-rtOut of support scope
Red Hat Enterprise Linux 8kernelAffected
Red Hat Enterprise Linux 8kernel-rtAffected
Red Hat Enterprise Linux 9kernelAffected
Red Hat Enterprise Linux 9kernel-rtAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-52885.

References

Check your stackJSON