CVE-2024-50216

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-50216
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-50216.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-50216
Downstream
Related
Published
2024-11-09T10:14:27Z
Modified
2025-10-17T16:15:17.111747Z
Summary
xfs: fix finding a last resort AG in xfs_filestream_pick_ag
Details

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

xfs: fix finding a last resort AG in xfsfilestreampick_ag

When the main loop in xfsfilestreampickag fails to find a suitable AG it tries to just pick the online AG. But the loop for that uses args->pag as loop iterator while the later code expects pag to be set. Fix this by reusing the maxpag case for this last resort, and also add a check for impossible case of no AG just to make sure that the uninitialized pag doesn't even escape in theory.

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
f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6
Fixed
77ddc732416b017180893cbb2356e9f0a414c575
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6
Fixed
a023408925acd64db5c8980373fcb3e28ec6fd29
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6
Fixed
dc60992ce76fbc2f71c2674f435ff6bde2108028

Affected versions

v6.*

v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.11
v6.11-rc1
v6.11-rc2
v6.11-rc3
v6.11-rc4
v6.11-rc5
v6.11-rc6
v6.11-rc7
v6.11.1
v6.11.2
v6.11.3
v6.11.4
v6.11.5
v6.11.6
v6.12-rc1
v6.12-rc2
v6.2
v6.2-rc7
v6.2-rc8
v6.3
v6.3-rc1
v6.3-rc2
v6.3-rc3
v6.3-rc4
v6.3-rc5
v6.3-rc6
v6.3-rc7
v6.4
v6.4-rc1
v6.4-rc2
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.5
v6.5-rc1
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.21
v6.6.22
v6.6.23
v6.6.24
v6.6.25
v6.6.26
v6.6.27
v6.6.28
v6.6.29
v6.6.3
v6.6.30
v6.6.31
v6.6.32
v6.6.33
v6.6.34
v6.6.35
v6.6.36
v6.6.37
v6.6.38
v6.6.39
v6.6.4
v6.6.40
v6.6.41
v6.6.42
v6.6.43
v6.6.44
v6.6.45
v6.6.46
v6.6.47
v6.6.48
v6.6.49
v6.6.5
v6.6.50
v6.6.51
v6.6.52
v6.6.53
v6.6.54
v6.6.55
v6.6.56
v6.6.57
v6.6.58
v6.6.59
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.9
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4
v6.9-rc5
v6.9-rc6
v6.9-rc7

Database specific

vanir_signatures

[
    {
        "signature_type": "Line",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@77ddc732416b017180893cbb2356e9f0a414c575",
        "signature_version": "v1",
        "target": {
            "file": "fs/xfs/xfs_filestream.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "340056084141005801350271313133816716759",
                "18376262572052105429191041128441118091",
                "185981440980895096460491869031397304892",
                "318713672779121681502904229751909759680",
                "290694736401525181540711576928221049223",
                "81961401635193410493699681686376066862",
                "266707935754093988987378376681533466851",
                "332976315476639507864899670567644582564",
                "112393359179349942650570842785302901878",
                "185787230137476911852531572886086024519",
                "171101908507181890692643687086006851496",
                "43650561287677734650297020794205398697",
                "92684244397562463573394863282876841048",
                "256698302087383359130527359972296925458",
                "223301898765925154454708412332252428412",
                "32950076336899248813185774897840624292",
                "317836018210072090660968254804597524432",
                "149207988687782084548328269078923776679",
                "139481221675322114176021667507436465187",
                "293746232138857681297403396688413400430",
                "337967573397201803859414130291261982779",
                "317076040201327740445314556380088441129",
                "41321027034866710091511797257979281969",
                "272383638223951611085122683287879845125",
                "242838752578982367752534537851577678679",
                "222050831877600488434879779561598743119"
            ]
        },
        "id": "CVE-2024-50216-2067effd"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a023408925acd64db5c8980373fcb3e28ec6fd29",
        "signature_version": "v1",
        "target": {
            "file": "fs/xfs/xfs_trace.h"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "92211861096334765070092355784631187947",
                "50221127829421167687863270820041566371",
                "1936052394550363761771705760263347391",
                "18813015942730090453803685226709284100",
                "34222727690285360719577406727331975024",
                "168058244560305265286451855808815903893",
                "311799111824023811959036974331464575357",
                "53284620249515180308754332427049679086",
                "214394060528176355985246462384098987036",
                "64852927262398203967840388851632293358",
                "329800771525851581170848200743893512458",
                "150074207758266380584547118988918416201",
                "56979908844833326406497376151580105672",
                "252161342773557853696390367686274080297",
                "111271597299869506137398963171600231235",
                "115138116825014109464128513675371092542"
            ]
        },
        "id": "CVE-2024-50216-2cacec89"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@77ddc732416b017180893cbb2356e9f0a414c575",
        "signature_version": "v1",
        "target": {
            "file": "fs/xfs/xfs_trace.h"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "92211861096334765070092355784631187947",
                "50221127829421167687863270820041566371",
                "1936052394550363761771705760263347391",
                "18813015942730090453803685226709284100",
                "34222727690285360719577406727331975024",
                "168058244560305265286451855808815903893",
                "311799111824023811959036974331464575357",
                "53284620249515180308754332427049679086",
                "214394060528176355985246462384098987036",
                "64852927262398203967840388851632293358",
                "329800771525851581170848200743893512458",
                "150074207758266380584547118988918416201",
                "56979908844833326406497376151580105672",
                "252161342773557853696390367686274080297",
                "111271597299869506137398963171600231235",
                "115138116825014109464128513675371092542"
            ]
        },
        "id": "CVE-2024-50216-4c32a449"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc60992ce76fbc2f71c2674f435ff6bde2108028",
        "signature_version": "v1",
        "target": {
            "file": "fs/xfs/xfs_trace.h"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "92211861096334765070092355784631187947",
                "50221127829421167687863270820041566371",
                "1936052394550363761771705760263347391",
                "18813015942730090453803685226709284100",
                "34222727690285360719577406727331975024",
                "168058244560305265286451855808815903893",
                "311799111824023811959036974331464575357",
                "53284620249515180308754332427049679086",
                "214394060528176355985246462384098987036",
                "64852927262398203967840388851632293358",
                "329800771525851581170848200743893512458",
                "150074207758266380584547118988918416201",
                "56979908844833326406497376151580105672",
                "252161342773557853696390367686274080297",
                "111271597299869506137398963171600231235",
                "115138116825014109464128513675371092542"
            ]
        },
        "id": "CVE-2024-50216-7148ffdc"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc60992ce76fbc2f71c2674f435ff6bde2108028",
        "signature_version": "v1",
        "target": {
            "file": "fs/xfs/xfs_filestream.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "340056084141005801350271313133816716759",
                "18376262572052105429191041128441118091",
                "185981440980895096460491869031397304892",
                "318713672779121681502904229751909759680",
                "290694736401525181540711576928221049223",
                "81961401635193410493699681686376066862",
                "266707935754093988987378376681533466851",
                "332976315476639507864899670567644582564",
                "112393359179349942650570842785302901878",
                "185787230137476911852531572886086024519",
                "171101908507181890692643687086006851496",
                "43650561287677734650297020794205398697",
                "92684244397562463573394863282876841048",
                "256698302087383359130527359972296925458",
                "223301898765925154454708412332252428412",
                "32950076336899248813185774897840624292",
                "317836018210072090660968254804597524432",
                "149207988687782084548328269078923776679",
                "139481221675322114176021667507436465187",
                "293746232138857681297403396688413400430",
                "337967573397201803859414130291261982779",
                "317076040201327740445314556380088441129",
                "41321027034866710091511797257979281969",
                "272383638223951611085122683287879845125",
                "242838752578982367752534537851577678679",
                "222050831877600488434879779561598743119"
            ]
        },
        "id": "CVE-2024-50216-7a73f8be"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a023408925acd64db5c8980373fcb3e28ec6fd29",
        "signature_version": "v1",
        "target": {
            "file": "fs/xfs/xfs_filestream.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "340056084141005801350271313133816716759",
                "18376262572052105429191041128441118091",
                "185981440980895096460491869031397304892",
                "318713672779121681502904229751909759680",
                "290694736401525181540711576928221049223",
                "81961401635193410493699681686376066862",
                "266707935754093988987378376681533466851",
                "332976315476639507864899670567644582564",
                "112393359179349942650570842785302901878",
                "185787230137476911852531572886086024519",
                "171101908507181890692643687086006851496",
                "43650561287677734650297020794205398697",
                "92684244397562463573394863282876841048",
                "256698302087383359130527359972296925458",
                "223301898765925154454708412332252428412",
                "32950076336899248813185774897840624292",
                "317836018210072090660968254804597524432",
                "149207988687782084548328269078923776679",
                "139481221675322114176021667507436465187",
                "293746232138857681297403396688413400430",
                "337967573397201803859414130291261982779",
                "317076040201327740445314556380088441129",
                "41321027034866710091511797257979281969",
                "272383638223951611085122683287879845125",
                "242838752578982367752534537851577678679",
                "222050831877600488434879779561598743119"
            ]
        },
        "id": "CVE-2024-50216-820c6662"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@77ddc732416b017180893cbb2356e9f0a414c575",
        "signature_version": "v1",
        "target": {
            "function": "xfs_filestream_pick_ag",
            "file": "fs/xfs/xfs_filestream.c"
        },
        "digest": {
            "function_hash": "293159043835671743137837455045038346853",
            "length": 1507.0
        },
        "id": "CVE-2024-50216-a2adf596"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a023408925acd64db5c8980373fcb3e28ec6fd29",
        "signature_version": "v1",
        "target": {
            "function": "xfs_filestream_pick_ag",
            "file": "fs/xfs/xfs_filestream.c"
        },
        "digest": {
            "function_hash": "293159043835671743137837455045038346853",
            "length": 1507.0
        },
        "id": "CVE-2024-50216-ad30e8e6"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc60992ce76fbc2f71c2674f435ff6bde2108028",
        "signature_version": "v1",
        "target": {
            "function": "xfs_filestream_pick_ag",
            "file": "fs/xfs/xfs_filestream.c"
        },
        "digest": {
            "function_hash": "293159043835671743137837455045038346853",
            "length": 1507.0
        },
        "id": "CVE-2024-50216-b8c39aa5"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.3.0
Fixed
6.6.60
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.11.7