CVE-2025-21954

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-21954
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21954.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-21954
Downstream
Published
2025-04-01T15:46:55.226Z
Modified
2025-11-16T14:41:39.104533Z
Summary
netmem: prevent TX of unreadable skbs
Details

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

netmem: prevent TX of unreadable skbs

Currently on stable trees we have support for netmem/devmem RX but not TX. It is not safe to forward/redirect an RX unreadable netmem packet into the device's TX path, as the device may call dma-mapping APIs on dma addrs that should not be passed to it.

Fix this by preventing the xmit of unreadable skbs.

Tested by configuring tc redirect:

sudo tc qdisc add dev eth1 ingress sudo tc filter add dev eth1 ingress protocol ip prio 1 flower ipproto \ tcp srcip 192.168.1.12 action mirred egress redirect dev eth1

Before, I see unreadable skbs in the driver's TX path passed to dma mapping APIs.

After, I don't see unreadable skbs in the driver's TX path passed to dma mapping APIs.

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
65249feb6b3df9e17bab5911ee56fa7b0971e231
Fixed
454825019d2f0c59e5174ece9e713f45ad80beff
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
65249feb6b3df9e17bab5911ee56fa7b0971e231
Fixed
1c17c8ced25c5fbe424c7ad7ea11d33014a986b1
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
65249feb6b3df9e17bab5911ee56fa7b0971e231
Fixed
f3600c867c99a2cc8038680ecf211089c50e7971

Affected versions

v6.*

v6.11
v6.11-rc7
v6.12
v6.12-rc1
v6.12-rc2
v6.12-rc3
v6.12-rc4
v6.12-rc5
v6.12-rc6
v6.12-rc7
v6.12.1
v6.12.10
v6.12.11
v6.12.12
v6.12.13
v6.12.14
v6.12.15
v6.12.16
v6.12.17
v6.12.18
v6.12.19
v6.12.2
v6.12.3
v6.12.4
v6.12.5
v6.12.6
v6.12.7
v6.12.8
v6.12.9
v6.13
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.13-rc4
v6.13-rc5
v6.13-rc6
v6.13-rc7
v6.13.1
v6.13.2
v6.13.3
v6.13.4
v6.13.5
v6.13.6
v6.13.7
v6.14-rc1
v6.14-rc2
v6.14-rc3
v6.14-rc4
v6.14-rc5

Database specific

vanir_signatures

[
    {
        "signature_type": "Line",
        "signature_version": "v1",
        "id": "CVE-2025-21954-02bb2f85",
        "digest": {
            "line_hashes": [
                "323515442690510663499994839073000722362",
                "164733683755522647016401831783561878141",
                "41793890851632736233217621869756410816"
            ],
            "threshold": 0.9
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@454825019d2f0c59e5174ece9e713f45ad80beff",
        "deprecated": false,
        "target": {
            "file": "net/core/dev.c"
        }
    },
    {
        "signature_type": "Line",
        "signature_version": "v1",
        "id": "CVE-2025-21954-05e88214",
        "digest": {
            "line_hashes": [
                "323515442690510663499994839073000722362",
                "164733683755522647016401831783561878141",
                "41793890851632736233217621869756410816"
            ],
            "threshold": 0.9
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3600c867c99a2cc8038680ecf211089c50e7971",
        "deprecated": false,
        "target": {
            "file": "net/core/dev.c"
        }
    },
    {
        "signature_type": "Line",
        "signature_version": "v1",
        "id": "CVE-2025-21954-533c97cd",
        "digest": {
            "line_hashes": [
                "323515442690510663499994839073000722362",
                "164733683755522647016401831783561878141",
                "41793890851632736233217621869756410816"
            ],
            "threshold": 0.9
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c17c8ced25c5fbe424c7ad7ea11d33014a986b1",
        "deprecated": false,
        "target": {
            "file": "net/core/dev.c"
        }
    },
    {
        "signature_type": "Function",
        "signature_version": "v1",
        "id": "CVE-2025-21954-70f8e25b",
        "digest": {
            "length": 910.0,
            "function_hash": "236525552869751509981783593279628451040"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3600c867c99a2cc8038680ecf211089c50e7971",
        "deprecated": false,
        "target": {
            "function": "validate_xmit_skb",
            "file": "net/core/dev.c"
        }
    },
    {
        "signature_type": "Function",
        "signature_version": "v1",
        "id": "CVE-2025-21954-8e41cef9",
        "digest": {
            "length": 910.0,
            "function_hash": "236525552869751509981783593279628451040"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@454825019d2f0c59e5174ece9e713f45ad80beff",
        "deprecated": false,
        "target": {
            "function": "validate_xmit_skb",
            "file": "net/core/dev.c"
        }
    },
    {
        "signature_type": "Function",
        "signature_version": "v1",
        "id": "CVE-2025-21954-e59f33f9",
        "digest": {
            "length": 910.0,
            "function_hash": "236525552869751509981783593279628451040"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c17c8ced25c5fbe424c7ad7ea11d33014a986b1",
        "deprecated": false,
        "target": {
            "function": "validate_xmit_skb",
            "file": "net/core/dev.c"
        }
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.12.0
Fixed
6.12.20
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.13.8