Bug 2347761 (CVE-2022-49408) - CVE-2022-49408 kernel: ext4: fix memory leak in parse_apply_sb_mount_options()
Summary: CVE-2022-49408 kernel: ext4: fix memory leak in parse_apply_sb_mount_options()
Keywords:
Status: NEW
Alias: CVE-2022-49408
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:05 UTC by OSIDB Bzimport
Modified: 2025-02-26 17:25 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:05:48 UTC
In the Linux kernel, the following vulnerability has been resolved:

ext4: fix memory leak in parse_apply_sb_mount_options()

If processing the on-disk mount options fails after any memory was
allocated in the ext4_fs_context, e.g. s_qf_names, then this memory is
leaked.  Fix this by calling ext4_fc_free() instead of kfree() directly.

Reproducer:

    mkfs.ext4 -F /dev/vdc
    tune2fs /dev/vdc -E mount_opts=usrjquota=file
    echo clear > /sys/kernel/debug/kmemleak
    mount /dev/vdc /vdc
    echo scan > /sys/kernel/debug/kmemleak
    sleep 5
    echo scan > /sys/kernel/debug/kmemleak
    cat /sys/kernel/debug/kmemleak

Comment 1 Avinash Hanwate 2025-02-26 13:09:48 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022652-CVE-2022-49408-2973@gregkh/T

Comment 4 Avinash Hanwate 2025-02-26 17:15:04 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022652-CVE-2022-49408-2973@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.