CVE-2024-42242

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-42242
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42242.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-42242
Downstream
Published
2024-08-07T15:14:29Z
Modified
2025-10-15T13:07:20.094156Z
Summary
mmc: sdhci: Fix max_seg_size for 64KiB PAGE_SIZE
Details

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

mmc: sdhci: Fix maxsegsize for 64KiB PAGE_SIZE

blkqueuemaxsegmentsize() ensured:

if (max_size < PAGE_SIZE)
    max_size = PAGE_SIZE;

whereas:

blkvalidatelimits() makes it an error:

if (WARN_ON_ONCE(lim->max_segment_size < PAGE_SIZE))
    return -EINVAL;

The change from one to the other, exposed sdhci which was setting maximum segment size too low in some circumstances.

Fix the maximum segment size when it is too low.

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
616f8766179277324393f7b77e07f14cb3503825
Fixed
bf78b1accef46efd9b624967cb74ae8d3c215a2b
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
616f8766179277324393f7b77e07f14cb3503825
Fixed
63d20a94f24fc1cbaf44d0e7c0e0a8077fde0aef

Affected versions

v6.*

v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.8
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
v6.9.1
v6.9.2
v6.9.3
v6.9.4
v6.9.5
v6.9.6
v6.9.7
v6.9.8
v6.9.9

Database specific

{
    "vanir_signatures": [
        {
            "id": "CVE-2024-42242-062f2adb",
            "signature_type": "Line",
            "target": {
                "file": "drivers/mmc/host/sdhci.c"
            },
            "signature_version": "v1",
            "digest": {
                "line_hashes": [
                    "89157310469223868753844702433748114650",
                    "307082574500014487483611352166369363214",
                    "45774944563988815680578025607179163166",
                    "196450292605654245895423462968517254594"
                ],
                "threshold": 0.9
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bf78b1accef46efd9b624967cb74ae8d3c215a2b"
        },
        {
            "id": "CVE-2024-42242-5e9f1363",
            "signature_type": "Line",
            "target": {
                "file": "drivers/mmc/host/sdhci.c"
            },
            "signature_version": "v1",
            "digest": {
                "line_hashes": [
                    "89157310469223868753844702433748114650",
                    "307082574500014487483611352166369363214",
                    "45774944563988815680578025607179163166",
                    "196450292605654245895423462968517254594"
                ],
                "threshold": 0.9
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@63d20a94f24fc1cbaf44d0e7c0e0a8077fde0aef"
        },
        {
            "id": "CVE-2024-42242-a2c14d24",
            "signature_type": "Function",
            "target": {
                "file": "drivers/mmc/host/sdhci.c",
                "function": "sdhci_setup_host"
            },
            "signature_version": "v1",
            "digest": {
                "length": 12356.0,
                "function_hash": "42344295890662805665528411393796078718"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bf78b1accef46efd9b624967cb74ae8d3c215a2b"
        },
        {
            "id": "CVE-2024-42242-d6dc4957",
            "signature_type": "Function",
            "target": {
                "file": "drivers/mmc/host/sdhci.c",
                "function": "sdhci_setup_host"
            },
            "signature_version": "v1",
            "digest": {
                "length": 12356.0,
                "function_hash": "42344295890662805665528411393796078718"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@63d20a94f24fc1cbaf44d0e7c0e0a8077fde0aef"
        }
    ]
}

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.9.0
Fixed
6.9.10