CVE-2024-26957: s390/zcrypt: fix reference counting on zcrypt card objects

Published May 1, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

s390/zcrypt: fix reference counting on zcrypt card objects

Tests with hot-plugging crytpo cards on KVM guests with debug kernel build revealed an use after free for the load field of the struct zcryptcard. The reason was an incorrect reference handling of the zcrypt card object which could lead to a free of the zcrypt card object while it was still in use.

This is an example of the slab message:

kernel: 0x00000000885a7512-0x00000000885a7513 @offset=1298. First byte 0x68 instead of 0x6b kernel: Allocated in zcryptcardalloc+0x36/0x70 [zcrypt] age=18046 cpu=3 pid=43 kernel: kmalloctrace+0x3f2/0x470 kernel: zcryptcardalloc+0x36/0x70 [zcrypt] kernel: zcryptcex4cardprobe+0x26/0x380 [zcryptcex4] kernel: apdeviceprobe+0x15c/0x290 kernel: reallyprobe+0xd2/0x468 kernel: driverprobedevice+0x40/0xf0 kernel: deviceattachdriver+0xc0/0x140 kernel: busforeachdrv+0x8c/0xd0 kernel: deviceattach+0x114/0x198 kernel: busprobedevice+0xb4/0xc8 kernel: deviceadd+0x4d2/0x6e0 kernel: apscanadapter+0x3d0/0x7c0 kernel: apscanbus+0x5a/0x3b0 kernel: apscanbuswqcallback+0x40/0x60 kernel: processonework+0x26e/0x620 kernel: workerthread+0x21c/0x440 kernel: Freed in zcryptcardput+0x54/0x80 [zcrypt] age=9024 cpu=3 pid=43 kernel: kfree+0x37e/0x418 kernel: zcryptcardput+0x54/0x80 [zcrypt] kernel: apdeviceremove+0x4c/0xe0 kernel: devicereleasedriverinternal+0x1c4/0x270 kernel: busremovedevice+0x100/0x188 kernel: devicedel+0x164/0x3c0 kernel: deviceunregister+0x30/0x90 kernel: apscanadapter+0xc8/0x7c0 kernel: apscanbus+0x5a/0x3b0 kernel: apscanbuswqcallback+0x40/0x60 kernel: processonework+0x26e/0x620 kernel: workerthread+0x21c/0x440 kernel: kthread+0x150/0x168 kernel: retfromfork+0x3c/0x58 kernel: retfromfork+0xa/0x30 kernel: Slab 0x00000372022169c0 objects=20 used=18 fp=0x00000000885a7c88 flags=0x3ffff00000000a00(workingset|slab|node=0|zone=1|lastcpupid=0x1ffff) kernel: Object 0x00000000885a74b8 @offset=1208 fp=0x00000000885a7c88 kernel: Redzone 00000000885a74b0: bb bb bb bb bb bb bb bb ........ kernel: Object 00000000885a74b8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk kernel: Object 00000000885a74c8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk kernel: Object 00000000885a74d8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk kernel: Object 00000000885a74e8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk kernel: Object 00000000885a74f8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk kernel: Object 00000000885a7508: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 68 4b 6b 6b 6b a5 kkkkkkkkkkhKkkk. kernel: Redzone 00000000885a7518: bb bb bb bb bb bb bb bb ........ kernel: Padding 00000000885a756c: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZ kernel: CPU: 0 PID: 387 Comm: systemd-udevd Not tainted 6.8.0-HF #2 kernel: Hardware name: IBM 3931 A01 704 (KVM/Linux) kernel: Call Trace: kernel: [<00000000ca5ab5b8>] dumpstacklvl+0x90/0x120 kernel: [<00000000c99d78bc>] checkbytesandreport+0x114/0x140 kernel: [<00000000c99d53cc>] checkobject+0x334/0x3f8 kernel: [<00000000c99d820c>] allocdebugprocessing+0xc4/0x1f8 kernel: [<00000000c99d852e>] getpartialnode.part.0+0x1ee/0x3e0 kernel: [<00000000c99d94ec>] slaballoc+0xaf4/0x13c8 kernel: [<00000000c99d9e38>] slaballoc.constprop.0+0x78/0xb8 kernel: [<00000000c99dc8dc>] kmalloc+0x434/0x590 kernel: [<00000000c9b4c0ce>] ext4htreestoredirent+0x4e/0x1c0 kernel: [<00000000c9b908a2>] htreedirblocktotree+0x17a/0x3f0 kernel: ---truncated---

Affected Software

10 affected componentsFixes available
Linux Linux kernel<4.19.312
Linux Linux kernel>=4.20<5.4.274
Linux Linux kernel>=5.5<5.10.215
Linux Linux kernel>=5.11<5.15.154
Linux Linux kernel>=5.16<6.1.84
Linux Linux kernel>=6.2<6.6.24
Linux Linux kernel>=6.7<6.7.12
Linux Linux kernel>=6.8<6.8.3
Debian Debian Linux=10.0
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1

Event History

May 1, 2024
CVE Published
via MITRE·05:19 AM
Data Sourced
via MITRE·05:19 AM
DescriptionSeverity
Data Sourced
via NVD·06:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Jun 8, 2024
Data Sourced
via Launchpad·01:11 AM
Description
Apr 28, 2025
Data Sourced
via Ubuntu·02:23 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-26957?

CVE-2024-26957 is classified with a high severity due to the potential for use after free vulnerabilities in the Linux kernel.

2

How do I fix CVE-2024-26957?

To fix CVE-2024-26957, users should upgrade to the patched versions of the Linux kernel: 5.10.223-1, 5.10.226-1, 6.1.119-1, 6.1.123-1, 6.12.10-1, or 6.12.11-1.

3

What is affected by CVE-2024-26957?

CVE-2024-26957 affects the Linux kernel, specifically the zcrypt card objects used in hot-plugging crypto cards.

4

What types of exploits are possible with CVE-2024-26957?

Exploiting CVE-2024-26957 could allow an attacker to execute arbitrary code or crash the system due to improper reference counting.

5

How can I determine if my system is vulnerable to CVE-2024-26957?

To determine if your system is vulnerable to CVE-2024-26957, check the version of your Linux kernel against the versions listed in the CVE description.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203