CVE-2024-50301 json
security/keys: fix slab-out-of-bounds in key_task_permission
published 2024-11-19 23 mo ago modified 2026-10-15 25 d ago also EUVD-2024-44803
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 20%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
security/keys: fix slab-out-of-bounds in key_task_permission
KASAN reports an out of bounds read: BUG: KASAN: slab-out-of-bounds in __kuid_val include/linux/uidgid.h:36 BUG: KASAN: slab-out-of-bounds in uid_eq include/linux/uidgid.h:63 [inline] BUG: KASAN: slab-out-of-bounds in key_task_permission+0x394/0x410 security/keys/permission.c:54 Read of size 4 at addr ffff88813c3ab618 by task stress-ng/4362
CPU: 2 PID: 4362 Comm: stress-ng Not tainted 5.10.0-14930-gafbffd6c3ede #15 Call Trace: __dump_stack lib/dump_stack.c:82 [inline] dump_stack+0x107/0x167 lib/dump_stack.c:123 print_address_description.constprop.0+0x19/0x170 mm/kasan/report.c:400 __kasan_report.cold+0x6c/0x84 mm/kasan/report.c:560 kasan_report+0x3a/0x50 mm/kasan/report.c:585 __kuid_val include/linux/uidgid.h:36 [inline] uid_eq include/linux/uidgid.h:63 [inline] key_task_permission+0x394/0x410 security/keys/permission.c:54 search_nested_keyrings+0x90e/0xe90 security/keys/keyring.c:793
This issue was also reported by syzbot.
It can be reproduced by following these steps(more details [1]): 1. Obtain more than 32 inputs that have similar hashes, which ends with the pattern '0xxxxxxxe6'. 2. Reboot and add the keys obtained in step 1.
The reproducer demonstrates how this issue happened: 1. In the search_nested_keyrings function, when it iterates through the slots in a node(below tag ascend_to_node), if the slot pointer is meta and node->back_pointer != NULL(it means a root), it will proceed to descend_to_node. However, there is an exception. If node is the root, and one of the slots points to a shortcut, it will be treated as a keyring. 2. Whether the ptr is keyring decided by keyring_ptr_is_keyring function. However, KEYRING_PTR_SUBTYPE is 0x2UL, the same as ASSOC_ARRAY_PTR_SUBTYPE_MASK. 3. When 32 keys with the similar hashes are added to the tree, the ROOT has keys with hashes that are not similar (e.g. slot 0) and it splits NODE A without using a shortcut. When NODE A is filled with keys that all hashes are xxe6, the keys are similar, NODE A will split with a shortcut. Finally, it forms the tree as shown below, where slot 6 points to a shortcut.
NODE A +------>+---+ ROOT | | 0 | xxe6 +---+ | +---+ xxxx | 0 | shortcut : : xxe6 +---+ | +---+ xxe6 : : | | | xxe6 +---+ | +---+ | 6 |---+ : : xxe6 +---+ +---+ xxe6 : : | f | xxe6 +---+ +---+ xxe6 | f | +---+
4. As mentioned above, If a slot(slot 6) of the root points to a shortcut, it may be mistakenly transferred to a key*, leading to a read out-of-bounds read.
To fix this issue, one should jump to descend_to_node if the ptr is a shortcut, regardless of whether the node is root or not.
[1] https://lore.kernel.org/linux-kernel/1cfa878e-8c7b-4570-8606-21daf5e13ce7@huaweicloud.com/
[jarkko: tweaked the commit message a bit to have an appropriate closes tag.]
Patch / fix
- Linux Linux 4.19.324, 5.4.286, 5.10.230, 5.15.172, 6.1.117, 6.6.61, 6.11.8, 6.12
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP V3.1.5
- Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP V3.1.5
- Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem V1.1.1
- Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP V3.1.5
- Siemens RUGGEDCOM RST2428P V3.2
- Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family V3.2
- Siemens SCALANCE XCM-/XRM-/XCH-/XRH-300 family V3.2
- linux Debian 12 6.1.119-1
- linux Debian 14, Debian 13 6.11.9-1
debian advisories DEBIAN-CVE-2024-50301
- linux Ubuntu 20.04 LTS 5.4.0-208.228
- linux Ubuntu 22.04 LTS 5.15.0-133.144
- linux Ubuntu 24.04 LTS 6.8.0-58.60
- linux-aws Ubuntu 20.04 LTS 5.4.0-1140.150
- linux-aws Ubuntu 22.04 LTS 5.15.0-1078.85
- linux-aws Ubuntu 24.04 LTS 6.8.0-1027.29
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1143.152
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1077.86
ubuntu advisories UBUNTU-CVE-2024-50301
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 RHEL 9 5.14.0-570.51.1.el9_6
- rv RHEL 9 5.14.0-570.51.1.el9_6
- perf RHEL 9 5.14.0-570.51.1.el9_6
- rtla RHEL 9 5.14.0-570.51.1.el9_6
- libperf RHEL 9 5.14.0-570.51.1.el9_6
- kernel-rt RHEL 9 5.14.0-570.51.1.el9_6
- kernel-64k RHEL 9 5.14.0-570.51.1.el9_6
- kernel-core RHEL 9 5.14.0-570.51.1.el9_6
red hat advisories RHSA-2025:17377RHSA-2025:9581RHSA-2025:9580
- kernel-livepatch-MICRO-6-0_Update_3 Linux Micro 6.0 7-1.2
- kernel-livepatch-MICRO-6-0_Update_2 Linux Micro 6.1, Linux Micro 6.0 7-1.1
- kernel-livepatch-MICRO-6-0-RT_Update_3 Linux Micro 6.0 7-1.2
- kgraft-patch-SLE12-SP5_Update_61 SLE Live Patching 12 SP5 18-4.1
- kernel-livepatch-SLE15-SP5_Update_19 SLE Live Patching 15 SP5 10-150500.3.1
- kernel-livepatch-SLE15-SP6_Update_3 SLE Live Patching 15 SP6 16-150600.2.2
- kernel-livepatch-SLE15-SP5_Update_14 SLE Live Patching 15 SP5 18-150500.2.1
- kernel-livepatch-SLE15-SP4_Update_33 SLE Live Patching 15 SP4 9-150400.2.1
suse advisories SUSE-SU-2025:4123-1SUSE-SU-2025:02171-1SUSE-SU-2025:02162-1SUSE-SU-2025:02157-1SUSE-SU-2025:02154-1SUSE-SU-2025:02144-1
- kernel AlmaLinux 9 5.14.0-570.51.1.el9_6
- rv AlmaLinux 9 5.14.0-570.51.1.el9_6
- perf AlmaLinux 9 5.14.0-570.51.1.el9_6
- rtla AlmaLinux 9 5.14.0-570.51.1.el9_6
- libperf AlmaLinux 9 5.14.0-570.51.1.el9_6
- kernel-rt AlmaLinux 9 5.14.0-570.51.1.el9_6
- kernel-64k AlmaLinux 9 5.14.0-570.51.1.el9_6
- kernel-core AlmaLinux 9 5.14.0-570.51.1.el9_6
almalinux advisories ALSA-2025:17377ALSA-2025:9580ALSA-2025:9581
- kernel-rt Rocky Linux 8 4.18.0-553.58.1.rt7.399.el8_10
- kernel Rocky Linux 8 4.18.0-553.58.1.el8_10
rocky linux advisories RLSA-2025:9581RLSA-2025:9580
- kernel Azure Linux 3.0 6.6.64.2-1
- kernel CBL-Mariner 2.0 5.15.173.1-1
azure linux advisories AZL-53429AZL-53648
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/c3ce634ad953ce48c75c39bdfd8b711dd95f346f commit
- git.kernel.org/stable/c/4efb69a0e294ef201bcdf7ce3d6202cd0a545a5d commit
- git.kernel.org/stable/c/1e4332581cd4eed75aea77af6f66cdcdda8b49b9 commit
- git.kernel.org/stable/c/199c20fb7499c79557a075dc24e9a7dae7d9f1ce commit
- git.kernel.org/stable/c/bbad2d5b6c99db468d8f88b6ba6a56ed409b4881 commit
- git.kernel.org/stable/c/3e79ad156bedf2da0ab909a118d2cec6c9c22b79 commit
- git.kernel.org/stable/c/e0a317ad68e4ea48a0158187238c5407e4fdec8b commit
- git.kernel.org/stable/c/4a74da044ec9ec8679e6beccc4306b936b62873f 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-2024-50301 updated cvss 7.1
kernel: security/keys: fix slab-out-of-bounds in key_task_permission
-
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 moreaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-570.51.1.el9_6, perf 5.14.0-570.51.1.el9_6, rtla 5.14.0-570.51.1.el9_6, python3-perf 5.14.0-570.51.1.el9_6, kernel-devel-matched 5.14.0-570.51.1.el9_6, kernel-64k-devel-matched 5.14.0-570.51.1.el9_6, +7 morefixed: vendor fix RHSA-2025:17377
-
Red Hat Enterprise Linux BaseOS (v. 8) perf 4.18.0-553.58.1.el8_10, kernel 4.18.0-553.58.1.el8_10, bpftool 4.18.0-553.58.1.el8_10, kernel-core 4.18.0-553.58.1.el8_10, kernel-tools 4.18.0-553.58.1.el8_10, python3-perf 4.18.0-553.58.1.el8_10, +15 morefixed: vendor fix RHSA-2025:9580
-
Red Hat Enterprise Linux BaseOS (v. 9) kernel 5.14.0-570.51.1.el9_6, kernel-64k 5.14.0-570.51.1.el9_6, kernel-core 5.14.0-570.51.1.el9_6, kernel-tools 5.14.0-570.51.1.el9_6, kernel-modules 5.14.0-570.51.1.el9_6, kernel-64k-core 5.14.0-570.51.1.el9_6, +27 more Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) libperf 5.14.0-570.51.1.el9_6, kernel-debuginfo-common-s390x 5.14.0-570.51.1.el9_6, kernel-debuginfo-common-x86_64 5.14.0-570.51.1.el9_6, kernel-debuginfo-common-aarch64 5.14.0-570.51.1.el9_6, kernel-debuginfo-common-ppc64le 5.14.0-570.51.1.el9_6fixed: vendor fix RHSA-2025:17377
-
Red Hat Enterprise Linux CRB (v. 8) kernel-debuginfo-common-x86_64 4.18.0-553.58.1.el8_10, kernel-debuginfo-common-aarch64 4.18.0-553.58.1.el8_10, kernel-debuginfo-common-ppc64le 4.18.0-553.58.1.el8_10fixed: vendor fix RHSA-2025:9580
-
Red Hat Enterprise Linux NFV (v. 8) kernel-rt 4.18.0-553.58.1.rt7.399.el8_10, kernel-rt-kvm 4.18.0-553.58.1.rt7.399.el8_10, kernel-rt-core 4.18.0-553.58.1.rt7.399.el8_10, kernel-rt-modules 4.18.0-553.58.1.rt7.399.el8_10, kernel-rt-debug-kvm 4.18.0-553.58.1.rt7.399.el8_10, kernel-rt-debug-core 4.18.0-553.58.1.rt7.399.el8_10, +4 morefixed: vendor fix RHSA-2025:9581
-
Red Hat Enterprise Linux Real Time (v. 9) kernel-rt 5.14.0-570.51.1.el9_6, kernel-rt-64k 5.14.0-570.51.1.el9_6, kernel-rt-core 5.14.0-570.51.1.el9_6, kernel-rt-modules 5.14.0-570.51.1.el9_6, kernel-rt-64k-core 5.14.0-570.51.1.el9_6, kernel-rt-debug-core 5.14.0-570.51.1.el9_6, +14 more Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt 5.14.0-570.51.1.el9_6, kernel-rt-kvm 5.14.0-570.51.1.el9_6, kernel-rt-core 5.14.0-570.51.1.el9_6, kernel-rt-modules 5.14.0-570.51.1.el9_6, kernel-rt-debug-kvm 5.14.0-570.51.1.el9_6, kernel-rt-debug-core 5.14.0-570.51.1.el9_6, +6 morefixed: vendor fix RHSA-2025:17377
-
Red Hat Enterprise Linux RT (v. 8) kernel-rt 4.18.0-553.58.1.rt7.399.el8_10, kernel-rt-core 4.18.0-553.58.1.rt7.399.el8_10, kernel-rt-modules 4.18.0-553.58.1.rt7.399.el8_10, kernel-rt-debug-core 4.18.0-553.58.1.rt7.399.el8_10, kernel-rt-debug-modules 4.18.0-553.58.1.rt7.399.el8_10, kernel-rt-modules-extra 4.18.0-553.58.1.rt7.399.el8_10, +2 morefixed: vendor fix RHSA-2025:9581
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 7.1
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 ICSA-25-226-07 updated cvss 7.1
Siemens Third-Party Components in SINEC OS
-
Siemens RUGGEDCOM RST2428P (6GK6242-6PA00) < 3.2affected: fixed in V3.2 support.industry.siemens.com
-
Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family < 3.2affected: fixed in V3.2
-
Siemens SCALANCE XCM-/XRM-/XCH-/XRH-300 family < 3.2affected: fixed in V3.2 support.industry.siemens.com
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
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 13 mo ago
Exploit prediction
0.28% chance of exploitation in the next 30 days, higher than 20% 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 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
| NVD | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
| CNA | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
Affected products
- Linux Linux
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP
- Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP
- Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem
- Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP
- Siemens RUGGEDCOM RST2428P
- Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family
- Siemens SCALANCE XCM-/XRM-/XCH-/XRH-300 family
Classification
- Weakness
-
- CWE-125 Out-of-bounds Read
- Technology feeds
References
-
git.kernel.org
/stable/c/c3ce634ad953ce48c75c39bdfd8b711dd95f346f
patch
-
git.kernel.org
/stable/c/4efb69a0e294ef201bcdf7ce3d6202cd0a545a5d
patch
-
git.kernel.org
/stable/c/1e4332581cd4eed75aea77af6f66cdcdda8b49b9
patch
-
git.kernel.org
/stable/c/199c20fb7499c79557a075dc24e9a7dae7d9f1ce
patch
-
git.kernel.org
/stable/c/bbad2d5b6c99db468d8f88b6ba6a56ed409b4881
patch
-
git.kernel.org
/stable/c/3e79ad156bedf2da0ab909a118d2cec6c9c22b79
patch
-
git.kernel.org
/stable/c/e0a317ad68e4ea48a0158187238c5407e4fdec8b
patch
-
git.kernel.org
/stable/c/4a74da044ec9ec8679e6beccc4306b936b62873f
patch
- lists.debian.org /debian-lts-announce/2025/03/msg00002.html
- lists.debian.org /debian-lts-announce/2025/01/msg00001.html
- cert-portal.siemens.com /productcert/html/ssa-398330.html
- cert-portal.siemens.com /productcert/html/ssa-265688.html
- cert-portal.siemens.com /productcert/html/ssa-355557.html
Sources
- CVE List CVE-2024-50301
- NVD CVE-2024-50301
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.