BlackTreeIndependent security intelligence
← Back to the CVE catalogue
Full vulnerability report · 2025
CVE-2021-47656High confidence

jffs2: fix use-after-free in jffs2_clear_xattr_subsystem

Linux · Linux

7.8HighCVSS 3.1
Recommended action
Within 7 days

High technical severity; prioritise exposed affected systems while verifying vendor guidance.

Patch available
Distribution package intelligence

Ubuntu vendor package status

Canonical’s release and source-package findings are shown separately from local repository availability.

1 package state
Repository candidate not checked

A published vendor fix does not prove that a matching update is enabled and installable on a particular asset. Confirm the local package candidate before scheduling remediation.

Ubuntu releaseSource packageVendor stateFixed versionEvidence
Ubuntu 24.04 LTSnoble · standard archivelinux-raspi-realtimeAffected, no fix publishedCanonical OVAL identifies this running kernel flavour as affected and does not publish a fixed package version in this definition.Not published in this feedCanonical record ↗Source updated 8 Sept 2026
Optional official sources

National CERT insights
?CERT means Computer Emergency Response Team; CSIRT is the closely related term Computer Security Incident Response Team.

Select the national-authority views to include. The exact source language is shown on each matched advisory. Your choice is remembered on this device and encoded in the shareable URL.

Official European source

ENISA European Vulnerability Database

Official EUVD identifiers, advisory evidence and known-exploited context. Missing fields are not treated as evidence of low risk.

1 current
ENISA EUVD identifier

EUVD-2021-34649

No EUVD known-exploited evidence

ENISA has published the identifier mapping but no EUVD description has been stored yet.

EUVD state
Present in the current official mapping
Known exploitation
Not present in the current ENISA EUVD known-exploited dataset. This is not proof of no exploitation.
ENISA score
Not supplied in the stored EUVD record
Advisory evidence
No linked advisory details stored yet
Recommended actionWithin 7 days

High technical severity; prioritise exposed affected systems while verifying vendor guidance.

Patch available
01

What, why and how

In the Linux kernel, the following vulnerability has been resolved: jffs2: fix use-after-free in jffs2_clear_xattr_subsystem When we mount a jffs2 image, assume that the first few blocks of the image are normal and contain at least one xattr-related inode, but the next block is abnormal. As a result, an error is returned in jffs2_scan_eraseblock(). jffs2_clear_xattr_subsystem() is then called in jffs2_build_filesystem() and then again in jffs2_do_fill_super(). Finally we can observe the following report: ================================================================== BUG: KASAN: use-after-free in jffs2_clear_xattr_subsystem+0x95/0x6ac Read of size 8 at addr ffff8881243384e0 by task mount/719 Call Trace: dump_stack+0x115/0x16b jffs2_clear_xattr_subsystem+0x95/0x6ac jffs2_do_fill_super+0x84f/0xc30 jffs2_fill_super+0x2ea/0x4c0 mtd_get_sb+0x254/0x400 mtd_get_sb_by_nr+0x4f/0xd0 get_tree_mtd+0x498/0x840 jffs2_get_tree+0x25/0x30 vfs_get_tree+0x8d/0x2e0 path_mount+0x50f/0x1e50 do_mount+0x107/0x130 __se_sys_mount+0x1c5/0x2f0 __x64_sys_mount+0xc7/0x160 do_syscall_64+0x45/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Allocated by task 719: kasan_save_stack+0x23/0x60 __kasan_kmalloc.constprop.0+0x10b/0x120 kasan_slab_alloc+0x12/0x20 kmem_cache_alloc+0x1c0/0x870 jffs2_alloc_xattr_ref+0x2f/0xa0 jffs2_scan_medium.cold+0x3713/0x4794 jffs2_do_mount_fs.cold+0xa7/0x2253 jffs2_do_fill_super+0x383/0xc30 jffs2_fill_super+0x2ea/0x4c0 [...] Freed by task 719: kmem_cache_free+0xcc/0x7b0 jffs2_free_xattr_ref+0x78/0x98 jffs2_clear_xattr_subsystem+0xa1/0x6ac jffs2_do_mount_fs.cold+0x5e6/0x2253 jffs2_do_fill_super+0x383/0xc30 jffs2_fill_super+0x2ea/0x4c0 [...] The buggy address belongs to the object at ffff8881243384b8 which belongs to the cache jffs2_xattr_ref of size 48 The buggy address is located 40 bytes inside of 48-byte region [ffff8881243384b8, ffff8881243384e8) [...] ================================================================== The triggering of the BUG is shown in the following stack: ----------------------------------------------------------- jffs2_fill_super jffs2_do_fill_super jffs2_do_mount_fs jffs2_build_filesystem jffs2_scan_medium jffs2_scan_eraseblock <--- ERROR jffs2_clear_xattr_subsystem <--- free jffs2_clear_xattr_subsystem <--- free again ----------------------------------------------------------- An error is returned in jffs2_do_mount_fs(). If the error is returned by jffs2_sum_init(), the jffs2_clear_xattr_subsystem() does not need to be executed. If the error is returned by jffs2_build_filesystem(), the jffs2_clear_xattr_subsystem() also does not need to be executed again. So move jffs2_clear_xattr_subsystem() from 'out_inohash' to 'out_root' to fix this UAF problem.

What

In the Linux kernel, the following vulnerability has been resolved: jffs2: fix use-after-free in jffs2_clear_xattr_subsystem When we mount a jffs2 image, assume that the first few blocks of the image are normal and contain at least one xattr-related inode, but the next block is abnormal. As a result, an error is returned in jffs2_scan_eraseblock(). jffs2_clear_xattr_subsystem() is then called in jffs2_build_filesystem() and then again in jffs2_do_fill_super(). Finally we can observe the following report: ================================================================== BUG: KASAN: use-after-free in jffs2_clear_xattr_subsystem+0x95/0x6ac Read of size 8 at addr ffff8881243384e0 by task mount/719 Call Trace: dump_stack+0x115/0x16b jffs2_clear_xattr_subsystem+0x95/0x6ac jffs2_do_fill_super+0x84f/0xc30 jffs2_fill_super+0x2ea/0x4c0 mtd_get_sb+0x254/0x400 mtd_get_sb_by_nr+0x4f/0xd0 get_tree_mtd+0x498/0x840 jffs2_get_tree+0x25/0x30 vfs_get_tree+0x8d/0x2e0 path_mount+0x50f/0x1e50 do_mount+0x107/0x130 __se_sys_mount+0x1c5/0x2f0 __x64_sys_mount+0xc7/0x160 do_syscall_64+0x45/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Allocated by task 719: kasan_save_stack+0x23/0x60 __kasan_kmalloc.constprop.0+0x10b/0x120 kasan_slab_alloc+0x12/0x20 kmem_cache_alloc+0x1c0/0x870 jffs2_alloc_xattr_ref+0x2f/0xa0 jffs2_scan_medium.cold+0x3713/0x4794 jffs2_do_mount_fs.cold+0xa7/0x2253 jffs2_do_fill_super+0x383/0xc30 jffs2_fill_super+0x2ea/0x4c0 [...] Freed by task 719: kmem_cache_free+0xcc/0x7b0 jffs2_free_xattr_ref+0x78/0x98 jffs2_clear_xattr_subsystem+0xa1/0x6ac jffs2_do_mount_fs.cold+0x5e6/0x2253 jffs2_do_fill_super+0x383/0xc30 jffs2_fill_super+0x2ea/0x4c0 [...] The buggy address belongs to the object at ffff8881243384b8 which belongs to the cache jffs2_xattr_ref of size 48 The buggy address is located 40 bytes inside of 48-byte region [ffff8881243384b8, ffff8881243384e8) [...] ================================================================== The triggering of the BUG is shown in the following stack: ----------------------------------------------------------- jffs2_fill_super jffs2_do_fill_super jffs2_do_mount_fs jffs2_build_filesystem jffs2_scan_medium jffs2_scan_eraseblock <--- ERROR jffs2_clear_xattr_subsystem <--- free jffs2_clear_xattr_subsystem <--- free again ----------------------------------------------------------- An error is returned in jffs2_do_mount_fs(). If the error is returned by jffs2_sum_init(), the jffs2_clear_xattr_subsystem() does not need to be executed. If the error is returned by jffs2_build_filesystem(), the jffs2_clear_xattr_subsystem() also does not need to be executed again. So move jffs2_clear_xattr_subsystem() from 'out_inohash' to 'out_root' to fix this UAF problem.

Why

The program can continue using memory after it has been released, producing unsafe and attacker-influenceable behaviour.

How

An attacker operating through local access may attempt exploitation without authentication after a user interaction. If successful, the issue may cause the confidentiality, integrity or availability impact described by the vendor.

What

In the Linux kernel, the following vulnerability has been resolved: jffs2: fix use-after-free in jffs2_clear_xattr_subsystem When we mount a jffs2 image, assume that the first few blocks of the image are normal and contain at least one xattr-related inode, but the next block is abnormal. As a result, an error is returned in jffs2_scan_eraseblock(). jffs2_clear_xattr_subsystem() is then called in jffs2_build_filesystem() and then again in jffs2_do_fill_super(). Finally we can observe the following report: ================================================================== BUG: KASAN: use-after-free in jffs2_clear_xattr_subsystem+0x95/0x6ac Read of size 8 at addr ffff8881243384e0 by task mount/719 Call Trace: dump_stack+0x115/0x16b jffs2_clear_xattr_subsystem+0x95/0x6ac jffs2_do_fill_super+0x84f/0xc30 jffs2_fill_super+0x2ea/0x4c0 mtd_get_sb+0x254/0x400 mtd_get_sb_by_nr+0x4f/0xd0 get_tree_mtd+0x498/0x840 jffs2_get_tree+0x25/0x30 vfs_get_tree+0x8d/0x2e0 path_mount+0x50f/0x1e50 do_mount+0x107/0x130 __se_sys_mount+0x1c5/0x2f0 __x64_sys_mount+0xc7/0x160 do_syscall_64+0x45/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Allocated by task 719: kasan_save_stack+0x23/0x60 __kasan_kmalloc.constprop.0+0x10b/0x120 kasan_slab_alloc+0x12/0x20 kmem_cache_alloc+0x1c0/0x870 jffs2_alloc_xattr_ref+0x2f/0xa0 jffs2_scan_medium.cold+0x3713/0x4794 jffs2_do_mount_fs.cold+0xa7/0x2253 jffs2_do_fill_super+0x383/0xc30 jffs2_fill_super+0x2ea/0x4c0 [...] Freed by task 719: kmem_cache_free+0xcc/0x7b0 jffs2_free_xattr_ref+0x78/0x98 jffs2_clear_xattr_subsystem+0xa1/0x6ac jffs2_do_mount_fs.cold+0x5e6/0x2253 jffs2_do_fill_super+0x383/0xc30 jffs2_fill_super+0x2ea/0x4c0 [...] The buggy address belongs to the object at ffff8881243384b8 which belongs to the cache jffs2_xattr_ref of size 48 The buggy address is located 40 bytes inside of 48-byte region [ffff8881243384b8, ffff8881243384e8) [...] ================================================================== The triggering of the BUG is shown in the following stack: ----------------------------------------------------------- jffs2_fill_super jffs2_do_fill_super jffs2_do_mount_fs jffs2_build_filesystem jffs2_scan_medium jffs2_scan_eraseblock <--- ERROR jffs2_clear_xattr_subsystem <--- free jffs2_clear_xattr_subsystem <--- free again ----------------------------------------------------------- An error is returned in jffs2_do_mount_fs(). If the error is returned by jffs2_sum_init(), the jffs2_clear_xattr_subsystem() does not need to be executed. If the error is returned by jffs2_build_filesystem(), the jffs2_clear_xattr_subsystem() also does not need to be executed again. So move jffs2_clear_xattr_subsystem() from 'out_inohash' to 'out_root' to fix this UAF problem.

Why

The program can continue using memory after it has been released, producing unsafe and attacker-influenceable behaviour.

How

An attacker operating through local access may attempt exploitation without authentication after a user interaction. If successful, the issue may cause the confidentiality, integrity or availability impact described by the vendor.

02

Exploit reality and attack path

CVSS severity, EPSS forecast probability, public exploit material and CISA-confirmed exploitation are separate signals.

Observed exploitation
?Confirmed exploitation and public exploit material are separate signals. Attacks can occur without public proof-of-concept or exploit code.
No confirmed evidence

No CISA KEV match was present at the last successful refresh. This means no confirmation from that source, not proof of no exploitation.

Public PoC / exploit material
?Confirmed exploitation and public exploit material are separate signals. Attacks can occur without public proof-of-concept or exploit code.
None recorded

No exploit-tagged reference or CISA SSVC proof-of-concept state is currently recorded. Research may still exist outside the structured feeds.

Likely attack path
local access → Use After Free → cause the confidentiality, integrity or availability impact described by the vendor
Attack surface
Local
Privileges required
None: unauthenticated exploitation is possible
User interaction
Required interaction required
Attack complexity
Low: no specialised conditions are recorded
Security boundary
Unchanged: impact remains within the vulnerable component's security authority
Weakness
?CWE means Common Weakness Enumeration: a standard category for the underlying weakness.
CWE-416

CWE-416: Use After Free. The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.

CVSS vector
?CVSS means Common Vulnerability Scoring System. The vector records the metric values used to calculate technical severity.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Common Vulnerability Scoring System 3.1: the compact vector below is decoded into plain language.

AVLocalAttack vector: The attacker needs local access to the vulnerable system.ACLowAttack complexity: No specialised conditions are required beyond attacker-controlled input.PRNonePrivileges required: The attacker does not need an account or existing privileges.UIRequiredUser interaction: Another user must perform an action for exploitation to succeed.SUnchangedScope: The security impact remains within the vulnerable component's authority.CHighConfidentiality impact: A successful attack can cause a major loss.IHighIntegrity impact: A successful attack can cause a major loss.AHighAvailability impact: A successful attack can cause a major loss.
Post-exploitation / living off the land
The issue can support a local privilege or sandbox boundary transition; normal system utilities may then be available in the gained context.
UnauthenticatedCWE-416
A

Official authority intelligence

Only matched European and national findings are included. Language selectors and unavailable sources are omitted.

CERT-FR · French · CERTFR-2025-AVI-0336Multiples vulnérabilités dans le noyau Linux de SUSE

d?id=CVE-2021-47646 Référence CVE CVE-2021-47647 https://www.cve.org/CVERecord?id=CVE-2021-47647 Référence CVE CVE-2021-47648 https://www.cve.org/CVERecord?id=CVE-2021-47648 Référence CVE CVE-2021-47649 https://www.cve.org/CVERecord?id=CVE-2021-47649 Référence CVE CVE-2021-47650 https://www.cve.org/CVERecord?id=CVE-2021-47650 Référence CVE CVE-2021-47651 https://www.cve.org/CVERecord?id=CVE-2021-47651 Référence CVE CVE-2021-47652 https://www.cve.org/CVERecord?id=CVE-2021-47652 Référence CVE CVE-2021-47653 https://www.cve.org/CVERecord?id=CVE-2021-47653 Référence CVE CVE-2021-47654 https://www.cve.org/CVERecord?id=CVE-2021-47654 Référence CVE CVE-2021-47656 https://www.cve.org/CVERecord?id=CVE-2021-47656 Référence CVE CVE-2021-47657 https://www.cve.org/CVERecord?id=CVE-2021-47657 Référence CVE CVE-2021-47659 https://www.cve.org/CVERecord?id=CVE-2021-47659 Référence CVE CVE-2022-0168 https://www.cve.org/CVERecord?id=CVE-2022-0168 Référence CVE CVE-2022-0995 https://www.cve.org/CVERecord?id=CVE-2022-0995 Référence CVE CVE-2022-1016 https://www.cve.org/CVERecord?id=CVE-2022-1016 Référence CVE CVE-2022-1048 https://www.cve.org/CVERecord?id=CVE-2022-1048 Référence CVE CVE-2022-1184 https://www.cve.org/CVERecord?id=CVE-2022-1184 Référence CVE CVE-2022-26373 https://www.cve.org/CVERecord?id=CVE-2022-2

Official advisory
CERT-FR · French · CERTFR-2025-AVI-0307Multiples vulnérabilités dans le noyau Linux de SUSE

d?id=CVE-2021-47646 Référence CVE CVE-2021-47647 https://www.cve.org/CVERecord?id=CVE-2021-47647 Référence CVE CVE-2021-47648 https://www.cve.org/CVERecord?id=CVE-2021-47648 Référence CVE CVE-2021-47649 https://www.cve.org/CVERecord?id=CVE-2021-47649 Référence CVE CVE-2021-47650 https://www.cve.org/CVERecord?id=CVE-2021-47650 Référence CVE CVE-2021-47651 https://www.cve.org/CVERecord?id=CVE-2021-47651 Référence CVE CVE-2021-47652 https://www.cve.org/CVERecord?id=CVE-2021-47652 Référence CVE CVE-2021-47653 https://www.cve.org/CVERecord?id=CVE-2021-47653 Référence CVE CVE-2021-47654 https://www.cve.org/CVERecord?id=CVE-2021-47654 Référence CVE CVE-2021-47656 https://www.cve.org/CVERecord?id=CVE-2021-47656 Référence CVE CVE-2021-47657 https://www.cve.org/CVERecord?id=CVE-2021-47657 Référence CVE CVE-2021-47659 https://www.cve.org/CVERecord?id=CVE-2021-47659 Référence CVE CVE-2022-0168 https://www.cve.org/CVERecord?id=CVE-2022-0168 Référence CVE CVE-2022-0995 https://www.cve.org/CVERecord?id=CVE-2022-0995 Référence CVE CVE-2022-1016 https://www.cve.org/CVERecord?id=CVE-2022-1016 Référence CVE CVE-2022-1048 https://www.cve.org/CVERecord?id=CVE-2022-1048 Référence CVE CVE-2022-1184 https://www.cve.org/CVERecord?id=CVE-2022-1184 Référence CVE CVE-2022-2977 https://www.cve.org/CVERecord?id=CVE-2022-29

Official advisory
CERT-FR · French · CERTFR-2025-AVI-0252Multiples vulnérabilités dans le noyau Linux de SUSE

d?id=CVE-2021-47646 Référence CVE CVE-2021-47647 https://www.cve.org/CVERecord?id=CVE-2021-47647 Référence CVE CVE-2021-47648 https://www.cve.org/CVERecord?id=CVE-2021-47648 Référence CVE CVE-2021-47649 https://www.cve.org/CVERecord?id=CVE-2021-47649 Référence CVE CVE-2021-47650 https://www.cve.org/CVERecord?id=CVE-2021-47650 Référence CVE CVE-2021-47651 https://www.cve.org/CVERecord?id=CVE-2021-47651 Référence CVE CVE-2021-47652 https://www.cve.org/CVERecord?id=CVE-2021-47652 Référence CVE CVE-2021-47653 https://www.cve.org/CVERecord?id=CVE-2021-47653 Référence CVE CVE-2021-47654 https://www.cve.org/CVERecord?id=CVE-2021-47654 Référence CVE CVE-2021-47656 https://www.cve.org/CVERecord?id=CVE-2021-47656 Référence CVE CVE-2021-47657 https://www.cve.org/CVERecord?id=CVE-2021-47657 Référence CVE CVE-2021-47659 https://www.cve.org/CVERecord?id=CVE-2021-47659 Référence CVE CVE-2022-0168 https://www.cve.org/CVERecord?id=CVE-2022-0168 Référence CVE CVE-2022-0995 https://www.cve.org/CVERecord?id=CVE-2022-0995 Référence CVE CVE-2022-1048 https://www.cve.org/CVERecord?id=CVE-2022-1048 Référence CVE CVE-2022-1184 https://www.cve.org/CVERecord?id=CVE-2022-1184 Référence CVE CVE-2022-2977 https://www.cve.org/CVERecord?id=CVE-2022-2977 Référence CVE CVE-2022-29900 https://www.cve.org/CVERecord?id=CVE-2022-2

Official advisory
03

Patch and workaround

Operational remediation based on structured source evidence.

Status
?Patch availability is based on structured fixed-version fields and authoritative update references. If no fix is verified, check the vendor advisory before making a change.
Patch available
Affected
aa98d7cf59b5b0764d3502662053489585faf2fe < 9150cb625b46f68d524f4cfd491f1aafc23e10a9; aa98d7cf59b5b0764d3502662053489585faf2fe < 3bd2454162ec6bbb5503233c804fce6e4b6dcec5; aa98d7cf59b5b0764d3502662053489585faf2fe < c3b07c875fa8f906f932976460fd14798596f101; aa98d7cf59b5b0764d3502662053489585faf2fe < 30bf7244acf32f19cb722c39f7bc1c2a9f300422; aa98d7cf59b5b0764d3502662053489585faf2fe < 7bb7428dd73991bf4b3a7a61b493ca50046c2b13; aa98d7cf59b5b0764d3502662053489585faf2fe < 7a75740206af5f17e9f3efa384211cba70213da1; aa98d7cf59b5b0764d3502662053489585faf2fe < 22327bd7988f21de3a53c1373f3b81542bfe1f44; aa98d7cf59b5b0764d3502662053489585faf2fe < 8c0f024f29e055840a5a89fe23b96ae3f921afed
Fixed
< 2.6.18; 4.9.311 ≤ 4.9.*; 4.14.276 ≤ 4.14.*; 4.19.238 ≤ 4.19.*; 5.4.189 ≤ 5.4.*; 5.10.110 ≤ 5.10.*; 5.15.33 ≤ 5.15.*; 5.16.19 ≤ 5.16.*
Action
Review the linked authoritative reference and apply the recorded fixed release appropriate to the affected product branch.
Workaround
No verified workaround is recorded. Limit untrusted access and use least privilege until authoritative guidance is available.
04

Evidence and provenance

Published 26 Feb 2025 · Last source change 5 Aug 2026, 08:48 UTC · CWE-416 · Use After Free

CVE recordCVE.org · 5.2
CVSS sourceCNA
EPSS source
?The date BlackTree first stored a score for this CVE from the daily FIRST EPSS feed.
FIRST · tracked since 2026-08-14
European sourceENISA EUVD · EUVD-2021-34649
Product sourceCNA
Remediation sourceCVE/CNA references
CWE sourceCISA ADP
NVD statusNVD modified after enrichment

Core structured fields are present and their contributing authorities are shown above.

Material change intelligence

What changed after publication

View recent updates →

No material field changes have been recorded since change tracking began. Routine source refreshes and cosmetic edits are intentionally excluded.

Material fields only · duplicate refreshes suppressed · history retained for the configured operational retention period
Technical terms and abbreviations used in this report
CVE
Common Vulnerabilities and Exposures: the public identifier for one disclosed vulnerability.
CVSS
Common Vulnerability Scoring System: a technical severity framework; it is not patching priority by itself.
EPSS
Exploit Prediction Scoring System: FIRST's estimate of the probability that exploitation activity will be observed in the next 30 days; it is a forecast, not confirmation.
CWE
Common Weakness Enumeration: the standard category describing the underlying software or hardware weakness.
CNA
CVE Numbering Authority: an organisation authorised to assign and publish CVE records.
CISA ADP
Cybersecurity and Infrastructure Security Agency Authorized Data Publisher: structured enrichment added to a CVE record.
NVD
National Vulnerability Database: NIST's enrichment service for CVE records.
CERT / CSIRT
A computer security incident response team that publishes warnings or coordinates incident response.
PoC
Proof of concept: public material that demonstrates or helps reproduce exploitation.
CSAF
Common Security Advisory Framework: a machine-readable format for security advisories.
LoTL
Living off the land: abuse of legitimate tools or system functions during an attack.
Free version - for non-commercial use only.CVE-2021-47656 · cve.blacktree.nl