CVE-2023-52447 json
bpf: Defer the free of inner map when necessary
published 2024-02-22 2 y ago modified 2026-10-15 25 d ago also EUVD-2023-57072
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 16%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
bpf: Defer the free of inner map when necessary
When updating or deleting an inner map in map array or map htab, the map may still be accessed by non-sleepable program or sleepable program. However bpf_map_fd_put_ptr() decreases the ref-counter of the inner map directly through bpf_map_put(), if the ref-counter is the last one (which is true for most cases), the inner map will be freed by ops->map_free() in a kworker. But for now, most .map_free() callbacks don't use synchronize_rcu() or its variants to wait for the elapse of a RCU grace period, so after the invocation of ops->map_free completes, the bpf program which is accessing the inner map may incur use-after-free problem.
Fix the free of inner map by invoking bpf_map_free_deferred() after both one RCU grace period and one tasks trace RCU grace period if the inner map has been removed from the outer map before. The deferment is accomplished by using call_rcu() or call_rcu_tasks_trace() when releasing the last ref-counter of bpf map. The newly-added rcu_head field in bpf_map shares the same storage space with work field to reduce the size of bpf_map.
Patch / fix
- Linux Linux 5.10.214, 5.15.153, 6.1.75, 6.6.14, 6.7.2, 6.8
- linux linux_kernel 5.10.214, 5.15.153, 6.1.75, 6.6.14, 6.7.2, 6.8
- Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem V1.1.1
- linux Debian 12 6.1.76-1
- linux Debian 14, Debian 13 6.6.15-1
debian advisories DEBIAN-CVE-2023-52447
- linux Ubuntu 22.04 LTS 5.15.0-112.122
- linux-aws Ubuntu 22.04 LTS 5.15.0-1063.69
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1062.70
- linux-gke Ubuntu 22.04 LTS 5.15.0-1060.66
- linux-ibm Ubuntu 22.04 LTS 5.15.0-1056.59
- linux-kvm Ubuntu 22.04 LTS 5.15.0-1060.65
- linux-azure Ubuntu 22.04 LTS 5.15.0-1066.75
- linux-gkeop Ubuntu 22.04 LTS 5.15.0-1046.53
ubuntu advisories UBUNTU-CVE-2023-52447
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-azure SLE Module for Public Cloud 15 SP5, openSUSE Leap 15.5 5.14.21-150500.33.48.1
- kernel-syms-azure SLE Module for Public Cloud 15 SP5, openSUSE Leap 15.5 5.14.21-150500.33.48.1
- kernel-source-azure SLE Module for Public Cloud 15 SP5, openSUSE Leap 15.5 5.14.21-150500.33.48.1
- dtb-aarch64 openSUSE Leap 15.5 5.14.21-150500.55.59.1
- kernel-64kb SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.59.1
- kernel-syms SLE Module for Development Tools 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.59.1
- kernel-obs-qa openSUSE Leap 15.5 5.14.21-150500.55.59.1
- kernel-source SLE Module for Development Tools 15 SP5, SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.59.1
suse advisories SUSE-SU-2024:1490-1SUSE-SU-2024:1480-1SUSE-SU-2024:1466-1SUSE-SU-2024:1321-1SUSE-SU-2024:0977-1SUSE-SU-2024:0910-1
- hyperv-daemons CBL-Mariner 2.0 5.15.153.1-1
- kernel CBL-Mariner 2.0 5.15.158.1-1
azure linux advisories AZL-35453AZL-35786
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- git.kernel.org/stable/c/90c445799fd1dc214d7c6279c144e33a35e29ef2 commit
- git.kernel.org/stable/c/37d98fb9c3144c0fddf7f6e99aece9927ac8dce6 commit
- git.kernel.org/stable/c/62fca83303d608ad4fec3f7428c8685680bb01b0 commit
- git.kernel.org/stable/c/f91cd728b10c51f6d4a39957ccd56d1e802fc8ee commit
- git.kernel.org/stable/c/bfd9b20c4862f41d4590fde11d70a5eeae53dcc5 commit
- git.kernel.org/stable/c/876673364161da50eed6b472d746ef88242b2368 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-52447 updated cvss 6.7
kernel: bpf: Defer the free of inner map when necessary
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 moreaffected: workaround, no fix available “No mitigation is currently available for this vulnerability. Make sure to perform the updates as they become available.”
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-24-102-01 updated cvss 3.9
Siemens SIMATIC S7-1500 TM MFP
-
Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystemaffected: mitigation, no fix available
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
0.25% chance of exploitation in the next 30 days, higher than 16% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CISA ADP | 3.1 | 6.7 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 6.7 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| CNA | 3.1 | 6.7 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
- linux linux_kernel
- Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem
Classification
- Weakness
-
- CWE-416 Use After Free
- Technology feeds
References
-
git.kernel.org
/stable/c/90c445799fd1dc214d7c6279c144e33a35e29ef2
patch
-
git.kernel.org
/stable/c/37d98fb9c3144c0fddf7f6e99aece9927ac8dce6
patch
-
git.kernel.org
/stable/c/62fca83303d608ad4fec3f7428c8685680bb01b0
patch
-
git.kernel.org
/stable/c/f91cd728b10c51f6d4a39957ccd56d1e802fc8ee
patch
-
git.kernel.org
/stable/c/bfd9b20c4862f41d4590fde11d70a5eeae53dcc5
patch
-
git.kernel.org
/stable/c/876673364161da50eed6b472d746ef88242b2368
patch
- lists.debian.org /debian-lts-announce/2024/06/msg00017.html
- cert-portal.siemens.com /productcert/html/ssa-265688.html
Sources
- CVE List CVE-2023-52447
- NVD CVE-2023-52447
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.