{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-49174",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-02-26T01:49:39.280Z",
        "datePublished": "2025-02-26T01:55:29.590Z",
        "dateUpdated": "2026-08-05T08:54:15.549Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:54:15.549Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix ext4_mb_mark_bb() with flex_bg with fast_commit\n\nIn case of flex_bg feature (which is by default enabled), extents for\nany given inode might span across blocks from two different block group.\next4_mb_mark_bb() only reads the buffer_head of block bitmap once for the\nstarting block group, but it fails to read it again when the extent length\nboundary overflows to another block group. Then in this below loop it\naccesses memory beyond the block group bitmap buffer_head and results\ninto a data abort.\n\n\tfor (i = 0; i < clen; i++)\n\t\tif (!mb_test_bit(blkoff + i, bitmap_bh->b_data) == !state)\n\t\t\talready++;\n\nThis patch adds this functionality for checking block group boundary in\next4_mb_mark_bb() and update the buffer_head(bitmap_bh) for every different\nblock group.\n\nw/o this patch, I was easily able to hit a data access abort using Power platform.\n\n<...>\n[   74.327662] EXT4-fs error (device loop3): ext4_mb_generate_buddy:1141: group 11, block bitmap and bg descriptor inconsistent: 21248 vs 23294 free clusters\n[   74.533214] EXT4-fs (loop3): shut down requested (2)\n[   74.536705] Aborting journal on device loop3-8.\n[   74.702705] BUG: Unable to handle kernel data access on read at 0xc00000005e980000\n[   74.703727] Faulting instruction address: 0xc0000000007bffb8\ncpu 0xd: Vector: 300 (Data Access) at [c000000015db7060]\n    pc: c0000000007bffb8: ext4_mb_mark_bb+0x198/0x5a0\n    lr: c0000000007bfeec: ext4_mb_mark_bb+0xcc/0x5a0\n    sp: c000000015db7300\n   msr: 800000000280b033\n   dar: c00000005e980000\n dsisr: 40000000\n  current = 0xc000000027af6880\n  paca    = 0xc00000003ffd5200   irqmask: 0x03   irq_happened: 0x01\n    pid   = 5167, comm = mount\n<...>\nenter ? for help\n[c000000015db7380] c000000000782708 ext4_ext_clear_bb+0x378/0x410\n[c000000015db7400] c000000000813f14 ext4_fc_replay+0x1794/0x2000\n[c000000015db7580] c000000000833f7c do_one_pass+0xe9c/0x12a0\n[c000000015db7710] c000000000834504 jbd2_journal_recover+0x184/0x2d0\n[c000000015db77c0] c000000000841398 jbd2_journal_load+0x188/0x4a0\n[c000000015db7880] c000000000804de8 ext4_fill_super+0x2638/0x3e10\n[c000000015db7a40] c0000000005f8404 get_tree_bdev+0x2b4/0x350\n[c000000015db7ae0] c0000000007ef058 ext4_get_tree+0x28/0x40\n[c000000015db7b00] c0000000005f6344 vfs_get_tree+0x44/0x100\n[c000000015db7b70] c00000000063c408 path_mount+0xdd8/0xe70\n[c000000015db7c40] c00000000063c8f0 sys_mount+0x450/0x550\n[c000000015db7d50] c000000000035770 system_call_exception+0x4a0/0x4e0\n[c000000015db7e10] c00000000000c74c system_call_common+0xec/0x250"
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The bug is only reached during local ext4 mount/journal recovery (sys_mount → ext4_fill_super → jbd2_journal_recover → ext4_fc_replay → ext4_mb_mark_bb), not via network protocol handlers such as ksmbd or nfsd.\nAC:L - An attacker who crafts an ext4 image with flex_bg (default) and fast_commit extents that span block groups can deterministically overflow the bitmap access; the reporter reproduced a data abort easily, with no race or attacker-uncontrollable condition.\nPR:L - In the worst reasonable deployment, an unprivileged local user can cause mount of a crafted volume via udisks/polkit automount or removable-media helpers, matching prior kernel CNA scoring of fast-commit replay bugs (e.g. CVE-2024-49983, CVE-2024-43828).\nUI:N - The attacker supplies and causes mounting of the crafted image through their own local workflow; no separate interactive victim confirmation beyond that local mount path is required.\nS:U - Impact is confined to the host kernel’s memory and availability within the same security authority; this is not a VM escape, IOMMU bypass, or other cross-boundary break.\nC:H - The loop performs out-of-bounds reads of bitmap_bh->b_data past the block-group bitmap, and the resulting unbounded memory corruption can be leveraged for kernel information disclosure under the higher-severity rule.\nI:H - After the OOB reads, ext4_set_bits()/mb_test_and_clear_bits() write past the bitmap buffer into adjacent kernel memory with attacker-controlled length, which is an exploitable out-of-bounds write.\nA:H - The bug demonstrably causes a kernel data-access abort/oops during mount (ext4_mb_mark_bb), which is a full availability impact."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/ext4/mballoc.c"
                    ],
                    "versions": [
                        {
                            "version": "8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2",
                            "lessThan": "cd6d719534af993210306f8a13f9cb3e615f7c8d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2",
                            "lessThan": "6a6beb074186a0452368a023a261c7d0eaebe838",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2",
                            "lessThan": "b07eedd0222e9548ffc568ec429bb1f61d21a39c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2",
                            "lessThan": "803fb0e8240cc16585a5c9df76add1dfaa781773",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2",
                            "lessThan": "bfdc502a4a4c058bf4cbb1df0c297761d528f54d",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/ext4/mballoc.c"
                    ],
                    "versions": [
                        {
                            "version": "5.10",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.10",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.110",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.33",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.16.19",
                            "lessThanOrEqual": "5.16.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.17.2",
                            "lessThanOrEqual": "5.17.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.18",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10",
                                    "versionEndExcluding": "5.10.110"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10",
                                    "versionEndExcluding": "5.15.33"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10",
                                    "versionEndExcluding": "5.16.19"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10",
                                    "versionEndExcluding": "5.17.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10",
                                    "versionEndExcluding": "5.18"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/cd6d719534af993210306f8a13f9cb3e615f7c8d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/6a6beb074186a0452368a023a261c7d0eaebe838"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b07eedd0222e9548ffc568ec429bb1f61d21a39c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/803fb0e8240cc16585a5c9df76add1dfaa781773"
                },
                {
                    "url": "https://git.kernel.org/stable/c/bfdc502a4a4c058bf4cbb1df0c297761d528f54d"
                }
            ],
            "title": "ext4: fix ext4_mb_mark_bb() with flex_bg with fast_commit",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}