CVE-2021-47221: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: mm/slub: actually fix freelist pointer vs redzoning It turns out that SLUB redzoning ("slub_debug=Z") checks from s->object_size rather than from s->inuse (which is normally bumped to make room for the freelist pointer), so a cache created with an object size less than 24 would have the freelist pointer written beyond s->object_size, causing the redzone to be corrupted by the freelist pointer. This was very visible with "slub_debug=ZF": BUG test (Tainted: G B ): Right Redzone overwritten ----------------------------------------------------------------------------- INFO: 0xffff957ead1c05de-0xffff957ead1c05df @offset=1502. First byte 0x1a instead of 0xbb INFO: Slab 0xffffef3950b47000 objects=170 used=170 fp=0x0000000000000000 flags=0x8000000000000200 INFO: Object 0xffff957ead1c05d8 @offset=1496 fp=0xffff957ead1c0620 Redzone (____ptrval____): bb bb bb bb bb bb bb bb ........ Object (____ptrval____): 00 00 00 00 00 f6 f4 a5 ........ Redzone (____ptrval____): 40 1d e8 1a aa @.... Padding (____ptrval____): 00 00 00 00 00 00 00 00 ........ Adjust the offset to stay within s->object_size. (Note that no caches of in this size range are known to exist in the kernel currently.)
AI Analysis
Technical Summary
CVE-2021-47221 is a vulnerability identified in the Linux kernel's SLUB memory allocator subsystem, specifically related to the redzoning feature used for debugging memory corruption issues. The SLUB allocator uses redzones—guard areas around allocated memory objects—to detect buffer overflows and memory corruption. The vulnerability arises because the redzoning checks incorrectly use the s->object_size field instead of s->inuse to determine the bounds for the freelist pointer placement. In cases where the cache object size is less than 24 bytes, the freelist pointer can overwrite the redzone area, corrupting it. This leads to false positives or missed detections of memory corruption when the "slub_debug=Z" or "slub_debug=ZF" debugging options are enabled. The issue was identified through kernel debug messages indicating right redzone overwrites and has been fixed by adjusting the offset calculations to stay within the object size boundaries. Importantly, the advisory notes that no known kernel caches currently use object sizes in the vulnerable range, suggesting limited practical exposure. There are no known exploits in the wild, and no CVSS score has been assigned yet. The vulnerability primarily affects Linux kernel versions prior to the patch and is relevant to systems using SLUB with redzoning enabled for debugging purposes.
Potential Impact
For European organizations, the direct impact of CVE-2021-47221 is likely limited due to the nature of the vulnerability and its debugging-specific context. Since the flaw affects the SLUB allocator's redzoning feature, which is typically enabled only in development or debugging environments, production systems running standard Linux kernel configurations without these debug flags are unlikely to be affected. However, organizations that perform kernel debugging or develop kernel modules may encounter false positives or instability during memory corruption detection, potentially delaying vulnerability assessments or kernel development activities. In rare cases, if a custom kernel or specialized embedded system uses small object caches with sizes under 24 bytes and enables SLUB redzoning, there could be memory corruption risks leading to system crashes or unpredictable behavior. This could impact critical infrastructure or industrial control systems running Linux kernels with these configurations. Overall, the vulnerability does not present a direct attack vector for remote exploitation or privilege escalation but may affect kernel debugging reliability and system stability in niche scenarios.
Mitigation Recommendations
European organizations should ensure that Linux kernel versions are updated to include the patch fixing CVE-2021-47221, especially in environments where kernel debugging with SLUB redzoning is used. Specifically, kernel developers and maintainers should verify that their build configurations do not enable "slub_debug=Z" or "slub_debug=ZF" on production systems unless necessary. For development and testing environments, apply the patch to avoid false positives and redzone corruption. Additionally, organizations using custom or embedded Linux kernels should audit their kernel cache configurations to confirm no caches exist with object sizes less than 24 bytes, or adjust configurations accordingly. Monitoring kernel debug logs for redzone overwrite messages can help detect residual issues. Since no known exploits exist, prioritizing this fix can be balanced against other critical patches, but it should be included in routine kernel maintenance and updates. Finally, maintain good kernel debugging practices and isolate debug-enabled systems from production environments to minimize risk.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2021-47221: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: mm/slub: actually fix freelist pointer vs redzoning It turns out that SLUB redzoning ("slub_debug=Z") checks from s->object_size rather than from s->inuse (which is normally bumped to make room for the freelist pointer), so a cache created with an object size less than 24 would have the freelist pointer written beyond s->object_size, causing the redzone to be corrupted by the freelist pointer. This was very visible with "slub_debug=ZF": BUG test (Tainted: G B ): Right Redzone overwritten ----------------------------------------------------------------------------- INFO: 0xffff957ead1c05de-0xffff957ead1c05df @offset=1502. First byte 0x1a instead of 0xbb INFO: Slab 0xffffef3950b47000 objects=170 used=170 fp=0x0000000000000000 flags=0x8000000000000200 INFO: Object 0xffff957ead1c05d8 @offset=1496 fp=0xffff957ead1c0620 Redzone (____ptrval____): bb bb bb bb bb bb bb bb ........ Object (____ptrval____): 00 00 00 00 00 f6 f4 a5 ........ Redzone (____ptrval____): 40 1d e8 1a aa @.... Padding (____ptrval____): 00 00 00 00 00 00 00 00 ........ Adjust the offset to stay within s->object_size. (Note that no caches of in this size range are known to exist in the kernel currently.)
AI-Powered Analysis
Technical Analysis
CVE-2021-47221 is a vulnerability identified in the Linux kernel's SLUB memory allocator subsystem, specifically related to the redzoning feature used for debugging memory corruption issues. The SLUB allocator uses redzones—guard areas around allocated memory objects—to detect buffer overflows and memory corruption. The vulnerability arises because the redzoning checks incorrectly use the s->object_size field instead of s->inuse to determine the bounds for the freelist pointer placement. In cases where the cache object size is less than 24 bytes, the freelist pointer can overwrite the redzone area, corrupting it. This leads to false positives or missed detections of memory corruption when the "slub_debug=Z" or "slub_debug=ZF" debugging options are enabled. The issue was identified through kernel debug messages indicating right redzone overwrites and has been fixed by adjusting the offset calculations to stay within the object size boundaries. Importantly, the advisory notes that no known kernel caches currently use object sizes in the vulnerable range, suggesting limited practical exposure. There are no known exploits in the wild, and no CVSS score has been assigned yet. The vulnerability primarily affects Linux kernel versions prior to the patch and is relevant to systems using SLUB with redzoning enabled for debugging purposes.
Potential Impact
For European organizations, the direct impact of CVE-2021-47221 is likely limited due to the nature of the vulnerability and its debugging-specific context. Since the flaw affects the SLUB allocator's redzoning feature, which is typically enabled only in development or debugging environments, production systems running standard Linux kernel configurations without these debug flags are unlikely to be affected. However, organizations that perform kernel debugging or develop kernel modules may encounter false positives or instability during memory corruption detection, potentially delaying vulnerability assessments or kernel development activities. In rare cases, if a custom kernel or specialized embedded system uses small object caches with sizes under 24 bytes and enables SLUB redzoning, there could be memory corruption risks leading to system crashes or unpredictable behavior. This could impact critical infrastructure or industrial control systems running Linux kernels with these configurations. Overall, the vulnerability does not present a direct attack vector for remote exploitation or privilege escalation but may affect kernel debugging reliability and system stability in niche scenarios.
Mitigation Recommendations
European organizations should ensure that Linux kernel versions are updated to include the patch fixing CVE-2021-47221, especially in environments where kernel debugging with SLUB redzoning is used. Specifically, kernel developers and maintainers should verify that their build configurations do not enable "slub_debug=Z" or "slub_debug=ZF" on production systems unless necessary. For development and testing environments, apply the patch to avoid false positives and redzone corruption. Additionally, organizations using custom or embedded Linux kernels should audit their kernel cache configurations to confirm no caches exist with object sizes less than 24 bytes, or adjust configurations accordingly. Monitoring kernel debug logs for redzone overwrite messages can help detect residual issues. Since no known exploits exist, prioritizing this fix can be balanced against other critical patches, but it should be included in routine kernel maintenance and updates. Finally, maintain good kernel debugging practices and isolate debug-enabled systems from production environments to minimize risk.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-04-10T18:59:19.529Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9835c4522896dcbea0c3
Added to database: 5/21/2025, 9:09:09 AM
Last enriched: 6/26/2025, 3:07:58 PM
Last updated: 8/21/2025, 3:45:38 PM
Views: 16
Related Threats
CVE-2025-43770: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Liferay Portal
MediumCVE-2025-55455: n/a
HighCVE-2025-8193
UnknownCVE-2025-9356: Stack-based Buffer Overflow in Linksys RE6250
HighCVE-2025-9355: Stack-based Buffer Overflow in Linksys RE6250
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.