CVE-2022-50428

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-50428
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50428.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-50428
Downstream
Related
Published
2025-10-01T11:42:07Z
Modified
2025-10-15T02:30:21.525110Z
Summary
ext4: fix off-by-one errors in fast-commit block filling
Details

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

ext4: fix off-by-one errors in fast-commit block filling

Due to several different off-by-one errors, or perhaps due to a late change in design that wasn't fully reflected in the code that was actually merged, there are several very strange constraints on how fast-commit blocks are filled with tlv entries:

  • tlvs must start at least 10 bytes before the end of the block, even though the minimum tlv length is 8. Otherwise, the replay code will ignore them. (BUG: ext4fcreserve_space() could violate this requirement if called with a len of blocksize - 9 or blocksize - 8. Fortunately, this doesn't seem to happen currently.)

  • tlvs must end at least 1 byte before the end of the block. Otherwise the replay code will consider them to be invalid. This quirk contributed to a bug (fixed by an earlier commit) where uninitialized memory was being leaked to disk in the last byte of blocks.

Also, strangely these constraints don't apply to the replay code in e2fsprogs, which will accept any tlvs in the blocks (with no bounds checks at all, but that is a separate issue...).

Given that this all seems to be a bug, let's fix it by just filling blocks with tlv entries in the natural way.

Note that old kernels will be unable to replay fast-commit journals created by kernels that have this commit.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e
Fixed
18f28f13301d1afb8cea9c4ddcecdbff14488ec6
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e
Fixed
5ca65dffdead16572ca046c43fb576b227f7f635
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e
Fixed
5439ad45c0d0c8db41eb6f4dce6f778f15a5ee16
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e
Fixed
48a6a66db82b8043d298a630f22c62d43550cae5

Affected versions

v5.*

v5.10
v5.10-rc1
v5.10-rc2
v5.10-rc3
v5.10-rc4
v5.10-rc5
v5.10-rc6
v5.10-rc7
v5.11
v5.11-rc1
v5.11-rc2
v5.11-rc3
v5.11-rc4
v5.11-rc5
v5.11-rc6
v5.11-rc7
v5.12
v5.12-rc1
v5.12-rc1-dontuse
v5.12-rc2
v5.12-rc3
v5.12-rc4
v5.12-rc5
v5.12-rc6
v5.12-rc7
v5.12-rc8
v5.13
v5.13-rc1
v5.13-rc2
v5.13-rc3
v5.13-rc4
v5.13-rc5
v5.13-rc6
v5.13-rc7
v5.14
v5.14-rc1
v5.14-rc2
v5.14-rc3
v5.14-rc4
v5.14-rc5
v5.14-rc6
v5.14-rc7
v5.15
v5.15-rc1
v5.15-rc2
v5.15-rc3
v5.15-rc4
v5.15-rc5
v5.15-rc6
v5.15-rc7
v5.15.1
v5.15.10
v5.15.11
v5.15.12
v5.15.13
v5.15.14
v5.15.15
v5.15.16
v5.15.17
v5.15.18
v5.15.19
v5.15.2
v5.15.20
v5.15.21
v5.15.22
v5.15.23
v5.15.24
v5.15.25
v5.15.26
v5.15.27
v5.15.28
v5.15.29
v5.15.3
v5.15.30
v5.15.31
v5.15.32
v5.15.33
v5.15.34
v5.15.35
v5.15.36
v5.15.37
v5.15.38
v5.15.39
v5.15.4
v5.15.40
v5.15.41
v5.15.42
v5.15.43
v5.15.44
v5.15.45
v5.15.46
v5.15.47
v5.15.48
v5.15.49
v5.15.5
v5.15.50
v5.15.51
v5.15.52
v5.15.53
v5.15.54
v5.15.55
v5.15.56
v5.15.57
v5.15.58
v5.15.59
v5.15.6
v5.15.60
v5.15.61
v5.15.62
v5.15.63
v5.15.64
v5.15.65
v5.15.66
v5.15.67
v5.15.68
v5.15.69
v5.15.7
v5.15.70
v5.15.71
v5.15.72
v5.15.73
v5.15.74
v5.15.75
v5.15.76
v5.15.77
v5.15.78
v5.15.79
v5.15.8
v5.15.80
v5.15.81
v5.15.82
v5.15.83
v5.15.84
v5.15.85
v5.15.86
v5.15.9
v5.16
v5.16-rc1
v5.16-rc2
v5.16-rc3
v5.16-rc4
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8
v5.9
v5.9-rc8

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.0.1
v6.0.10
v6.0.11
v6.0.12
v6.0.13
v6.0.14
v6.0.15
v6.0.16
v6.0.17
v6.0.2
v6.0.3
v6.0.4
v6.0.5
v6.0.6
v6.0.7
v6.0.8
v6.0.9
v6.1
v6.1-rc1
v6.1-rc2
v6.1-rc3
v6.1-rc4
v6.1-rc5
v6.1-rc6
v6.1-rc7
v6.1-rc8
v6.1.1
v6.1.2
v6.1.3

Database specific

{
    "vanir_signatures": [
        {
            "digest": {
                "length": 1003.0,
                "function_hash": "117746750993442721646635292715813389808"
            },
            "target": {
                "function": "ext4_fc_write_tail",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48a6a66db82b8043d298a630f22c62d43550cae5",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-05b24dcd"
        },
        {
            "digest": {
                "length": 2289.0,
                "function_hash": "181255336090322548586293956105869756867"
            },
            "target": {
                "function": "ext4_fc_replay",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@18f28f13301d1afb8cea9c4ddcecdbff14488ec6",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-17caeb05"
        },
        {
            "digest": {
                "length": 2289.0,
                "function_hash": "181255336090322548586293956105869756867"
            },
            "target": {
                "function": "ext4_fc_replay",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48a6a66db82b8043d298a630f22c62d43550cae5",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-195c165b"
        },
        {
            "digest": {
                "length": 2986.0,
                "function_hash": "127713646302779651023270602149352257496"
            },
            "target": {
                "function": "ext4_fc_replay_scan",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48a6a66db82b8043d298a630f22c62d43550cae5",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-45730616"
        },
        {
            "digest": {
                "length": 1155.0,
                "function_hash": "138285880662812188582529250790512590726"
            },
            "target": {
                "function": "ext4_fc_reserve_space",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48a6a66db82b8043d298a630f22c62d43550cae5",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-5c31ca84"
        },
        {
            "digest": {
                "line_hashes": [
                    "57913064040189604851186997198417927384",
                    "147684294991280272285392598299158097354",
                    "121042513967871769560141572160272782142",
                    "39405056680309875147580875059377426098",
                    "75162131264610619452149901072448616904",
                    "307090752463470063571130242886617278286",
                    "256926679238319145099663216659239762450",
                    "218664400899002516053933202851008641117",
                    "306047037800249725789803418651348781068",
                    "233546475773107816520993775374611089218",
                    "232985667358124115141701616122772121446",
                    "281891856641883825014206597722837461778",
                    "241172119505118453088090490763953144309",
                    "314634935089757905557736750352897414923",
                    "174334288352519834351287998337167970712",
                    "204931519631890393349517331071663367787",
                    "136041469467367413608416466743237040539",
                    "176115790316985769999544493560915308658",
                    "317012272493597465519601811931416879941",
                    "283322529689820310045844178543304958514",
                    "176642928307280673346431044854983460664",
                    "96799698886928391958074569447371518473",
                    "140708658909891789018495758225340061824",
                    "93619623626801665057505828913802607844",
                    "118535346383551453171822752011258222760",
                    "118955059529737364265994755228725600517",
                    "184883574195372254069363351749483285512",
                    "136905134009021091892315885160201770133",
                    "170282348352342106010351766745771572193",
                    "42619167619338636106313116388208601694",
                    "88776062436640856801085716394102710810",
                    "11646908885548619821038947537548477226",
                    "253163982723473689557424852970167498316",
                    "240209513113200639415338542163788707180",
                    "76779867793988114362050665261147830307",
                    "75805207840860755248794204665897159041",
                    "323801993133507556158163631180017158639",
                    "180520595739508462429146688203406495765",
                    "139398848104803163983516629271217750313",
                    "39793190184318725394441938541142200861",
                    "264612698971061869166038040148966830657",
                    "325818406574316873851193271338016402865",
                    "212795020884094104908651955763067224109",
                    "164591102605564968139349625148450364368",
                    "182927885780020340211908947550923384842",
                    "226834917371934420692571575643867014149",
                    "54068870946149220870567606120222027506",
                    "66526768389816011641965164817029284744",
                    "164591102605564968139349625148450364368"
                ],
                "threshold": 0.9
            },
            "target": {
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Line",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5ca65dffdead16572ca046c43fb576b227f7f635",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-67d187ee"
        },
        {
            "digest": {
                "length": 1155.0,
                "function_hash": "138285880662812188582529250790512590726"
            },
            "target": {
                "function": "ext4_fc_reserve_space",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@18f28f13301d1afb8cea9c4ddcecdbff14488ec6",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-72be0c34"
        },
        {
            "digest": {
                "length": 2986.0,
                "function_hash": "127713646302779651023270602149352257496"
            },
            "target": {
                "function": "ext4_fc_replay_scan",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5ca65dffdead16572ca046c43fb576b227f7f635",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-836db3e9"
        },
        {
            "digest": {
                "length": 2986.0,
                "function_hash": "127713646302779651023270602149352257496"
            },
            "target": {
                "function": "ext4_fc_replay_scan",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@18f28f13301d1afb8cea9c4ddcecdbff14488ec6",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-98c92571"
        },
        {
            "digest": {
                "length": 1003.0,
                "function_hash": "117746750993442721646635292715813389808"
            },
            "target": {
                "function": "ext4_fc_write_tail",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@18f28f13301d1afb8cea9c4ddcecdbff14488ec6",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-9a783758"
        },
        {
            "digest": {
                "length": 1003.0,
                "function_hash": "117746750993442721646635292715813389808"
            },
            "target": {
                "function": "ext4_fc_write_tail",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5ca65dffdead16572ca046c43fb576b227f7f635",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-b0c59d2f"
        },
        {
            "digest": {
                "length": 1155.0,
                "function_hash": "138285880662812188582529250790512590726"
            },
            "target": {
                "function": "ext4_fc_reserve_space",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5ca65dffdead16572ca046c43fb576b227f7f635",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-b5cc32f8"
        },
        {
            "digest": {
                "line_hashes": [
                    "57913064040189604851186997198417927384",
                    "147684294991280272285392598299158097354",
                    "121042513967871769560141572160272782142",
                    "39405056680309875147580875059377426098",
                    "75162131264610619452149901072448616904",
                    "307090752463470063571130242886617278286",
                    "256926679238319145099663216659239762450",
                    "218664400899002516053933202851008641117",
                    "306047037800249725789803418651348781068",
                    "233546475773107816520993775374611089218",
                    "232985667358124115141701616122772121446",
                    "281891856641883825014206597722837461778",
                    "241172119505118453088090490763953144309",
                    "314634935089757905557736750352897414923",
                    "174334288352519834351287998337167970712",
                    "204931519631890393349517331071663367787",
                    "136041469467367413608416466743237040539",
                    "176115790316985769999544493560915308658",
                    "317012272493597465519601811931416879941",
                    "283322529689820310045844178543304958514",
                    "176642928307280673346431044854983460664",
                    "96799698886928391958074569447371518473",
                    "140708658909891789018495758225340061824",
                    "93619623626801665057505828913802607844",
                    "118535346383551453171822752011258222760",
                    "118955059529737364265994755228725600517",
                    "184883574195372254069363351749483285512",
                    "136905134009021091892315885160201770133",
                    "170282348352342106010351766745771572193",
                    "42619167619338636106313116388208601694",
                    "88776062436640856801085716394102710810",
                    "11646908885548619821038947537548477226",
                    "253163982723473689557424852970167498316",
                    "240209513113200639415338542163788707180",
                    "76779867793988114362050665261147830307",
                    "75805207840860755248794204665897159041",
                    "323801993133507556158163631180017158639",
                    "180520595739508462429146688203406495765",
                    "139398848104803163983516629271217750313",
                    "39793190184318725394441938541142200861",
                    "264612698971061869166038040148966830657",
                    "325818406574316873851193271338016402865",
                    "212795020884094104908651955763067224109",
                    "164591102605564968139349625148450364368",
                    "182927885780020340211908947550923384842",
                    "226834917371934420692571575643867014149",
                    "54068870946149220870567606120222027506",
                    "66526768389816011641965164817029284744",
                    "164591102605564968139349625148450364368"
                ],
                "threshold": 0.9
            },
            "target": {
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Line",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48a6a66db82b8043d298a630f22c62d43550cae5",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-c91e7d4c"
        },
        {
            "digest": {
                "line_hashes": [
                    "57913064040189604851186997198417927384",
                    "147684294991280272285392598299158097354",
                    "121042513967871769560141572160272782142",
                    "39405056680309875147580875059377426098",
                    "75162131264610619452149901072448616904",
                    "307090752463470063571130242886617278286",
                    "256926679238319145099663216659239762450",
                    "218664400899002516053933202851008641117",
                    "306047037800249725789803418651348781068",
                    "233546475773107816520993775374611089218",
                    "232985667358124115141701616122772121446",
                    "281891856641883825014206597722837461778",
                    "241172119505118453088090490763953144309",
                    "314634935089757905557736750352897414923",
                    "174334288352519834351287998337167970712",
                    "204931519631890393349517331071663367787",
                    "136041469467367413608416466743237040539",
                    "176115790316985769999544493560915308658",
                    "317012272493597465519601811931416879941",
                    "283322529689820310045844178543304958514",
                    "176642928307280673346431044854983460664",
                    "96799698886928391958074569447371518473",
                    "140708658909891789018495758225340061824",
                    "93619623626801665057505828913802607844",
                    "118535346383551453171822752011258222760",
                    "118955059529737364265994755228725600517",
                    "184883574195372254069363351749483285512",
                    "136905134009021091892315885160201770133",
                    "170282348352342106010351766745771572193",
                    "42619167619338636106313116388208601694",
                    "88776062436640856801085716394102710810",
                    "11646908885548619821038947537548477226",
                    "253163982723473689557424852970167498316",
                    "240209513113200639415338542163788707180",
                    "76779867793988114362050665261147830307",
                    "75805207840860755248794204665897159041",
                    "323801993133507556158163631180017158639",
                    "180520595739508462429146688203406495765",
                    "139398848104803163983516629271217750313",
                    "39793190184318725394441938541142200861",
                    "264612698971061869166038040148966830657",
                    "325818406574316873851193271338016402865",
                    "212795020884094104908651955763067224109",
                    "164591102605564968139349625148450364368",
                    "182927885780020340211908947550923384842",
                    "226834917371934420692571575643867014149",
                    "54068870946149220870567606120222027506",
                    "66526768389816011641965164817029284744",
                    "164591102605564968139349625148450364368"
                ],
                "threshold": 0.9
            },
            "target": {
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Line",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@18f28f13301d1afb8cea9c4ddcecdbff14488ec6",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-e2436bcd"
        },
        {
            "digest": {
                "length": 2289.0,
                "function_hash": "181255336090322548586293956105869756867"
            },
            "target": {
                "function": "ext4_fc_replay",
                "file": "fs/ext4/fast_commit.c"
            },
            "signature_type": "Function",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5ca65dffdead16572ca046c43fb576b227f7f635",
            "deprecated": false,
            "signature_version": "v1",
            "id": "CVE-2022-50428-ef3751fa"
        }
    ]
}

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.10.0
Fixed
5.15.87
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.0.18
Type
ECOSYSTEM
Events
Introduced
6.1.0
Fixed
6.1.4