CVE-2024-27010

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-27010
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-27010.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-27010
Downstream
Related
Published
2024-05-01T05:29:23.494Z
Modified
2025-11-20T03:58:34.081321Z
Summary
net/sched: Fix mirred deadlock on device recursion
Details

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

net/sched: Fix mirred deadlock on device recursion

When the mirred action is used on a classful egress qdisc and a packet is mirrored or redirected to self we hit a qdisc lock deadlock. See trace below.

[..... other info removed for brevity....] [ 82.890906] [ 82.890906] ============================================ [ 82.890906] WARNING: possible recursive locking detected [ 82.890906] 6.8.0-05205-g77fadd89fe2d-dirty #213 Tainted: G W [ 82.890906] -------------------------------------------- [ 82.890906] ping/418 is trying to acquire lock: [ 82.890906] ffff888006994110 (&sch->q.lock){+.-.}-{3:3}, at: _devqueuexmit+0x1778/0x3550 [ 82.890906] [ 82.890906] but task is already holding lock: [ 82.890906] ffff888006994110 (&sch->q.lock){+.-.}-{3:3}, at: _devqueuexmit+0x1778/0x3550 [ 82.890906] [ 82.890906] other info that might help us debug this: [ 82.890906] Possible unsafe locking scenario: [ 82.890906] [ 82.890906] CPU0 [ 82.890906] ---- [ 82.890906] lock(&sch->q.lock); [ 82.890906] lock(&sch->q.lock); [ 82.890906] [ 82.890906] * DEADLOCK * [ 82.890906] [..... other info removed for brevity....]

Example setup (eth0->eth0) to recreate tc qdisc add dev eth0 root handle 1: htb default 30 tc filter add dev eth0 handle 1: protocol ip prio 2 matchall \ action mirred egress redirect dev eth0

Another example(eth0->eth1->eth0) to recreate tc qdisc add dev eth0 root handle 1: htb default 30 tc filter add dev eth0 handle 1: protocol ip prio 2 matchall \ action mirred egress redirect dev eth1

tc qdisc add dev eth1 root handle 1: htb default 30 tc filter add dev eth1 handle 1: protocol ip prio 2 matchall \ action mirred egress redirect dev eth0

We fix this by adding an owner field (CPU id) to struct Qdisc set after root qdisc is entered. When the softirq enters it a second time, if the qdisc owner is the same CPU, the packet is dropped to break the loop.

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
e578d9c02587d57bfa7b560767c698a668a468c6
Fixed
e6b90468da4dae2281a6e381107f411efb48b0ef
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
e578d9c02587d57bfa7b560767c698a668a468c6
Fixed
0f022d32c3eca477fbf79a205243a6123ed0fe11

Affected versions

v4.*

v4.1
v4.1-rc4
v4.1-rc5
v4.1-rc6
v4.1-rc7
v4.1-rc8
v4.10
v4.10-rc1
v4.10-rc2
v4.10-rc3
v4.10-rc4
v4.10-rc5
v4.10-rc6
v4.10-rc7
v4.10-rc8
v4.11
v4.11-rc1
v4.11-rc2
v4.11-rc3
v4.11-rc4
v4.11-rc5
v4.11-rc6
v4.11-rc7
v4.11-rc8
v4.12
v4.12-rc1
v4.12-rc2
v4.12-rc3
v4.12-rc4
v4.12-rc5
v4.12-rc6
v4.12-rc7
v4.13
v4.13-rc1
v4.13-rc2
v4.13-rc3
v4.13-rc4
v4.13-rc5
v4.13-rc6
v4.13-rc7
v4.14
v4.14-rc1
v4.14-rc2
v4.14-rc3
v4.14-rc4
v4.14-rc5
v4.14-rc6
v4.14-rc7
v4.14-rc8
v4.15
v4.15-rc1
v4.15-rc2
v4.15-rc3
v4.15-rc4
v4.15-rc5
v4.15-rc6
v4.15-rc7
v4.15-rc8
v4.15-rc9
v4.16
v4.16-rc1
v4.16-rc2
v4.16-rc3
v4.16-rc4
v4.16-rc5
v4.16-rc6
v4.16-rc7
v4.17
v4.17-rc1
v4.17-rc2
v4.17-rc3
v4.17-rc4
v4.17-rc5
v4.17-rc6
v4.17-rc7
v4.18
v4.18-rc1
v4.18-rc2
v4.18-rc3
v4.18-rc4
v4.18-rc5
v4.18-rc6
v4.18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8
v5.8-rc1
v5.8-rc2
v5.8-rc3
v5.8-rc4
v5.8-rc5
v5.8-rc6
v5.8-rc7
v5.9
v5.9-rc1
v5.9-rc2
v5.9-rc3
v5.9-rc4
v5.9-rc5
v5.9-rc6
v5.9-rc7
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.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.2
v6.2-rc1
v6.2-rc2
v6.2-rc3
v6.2-rc4
v6.2-rc5
v6.2-rc6
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.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.8.1
v6.8.2
v6.8.3
v6.8.4
v6.8.5
v6.8.6
v6.8.7
v6.9-rc1
v6.9-rc2
v6.9-rc3

Database specific

vanir_signatures

[
    {
        "deprecated": false,
        "target": {
            "file": "net/core/dev.c",
            "function": "__dev_xmit_skb"
        },
        "digest": {
            "length": 1864.0,
            "function_hash": "315744530365695781642129625138015551872"
        },
        "id": "CVE-2024-27010-0605c907",
        "signature_type": "Function",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6b90468da4dae2281a6e381107f411efb48b0ef",
        "signature_version": "v1"
    },
    {
        "deprecated": false,
        "target": {
            "file": "net/sched/sch_generic.c",
            "function": "qdisc_alloc"
        },
        "digest": {
            "length": 1412.0,
            "function_hash": "281759684481034378545486730015134335196"
        },
        "id": "CVE-2024-27010-3e70b1a2",
        "signature_type": "Function",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f022d32c3eca477fbf79a205243a6123ed0fe11",
        "signature_version": "v1"
    },
    {
        "deprecated": false,
        "target": {
            "file": "net/core/dev.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "53298560351014202099411594189678347566",
                "184891801393182576858353012778763796436",
                "328942525527325642159282736362970707712",
                "292303773815440850038985657017866483001",
                "207777653581622644935454574263284681535",
                "238373890031548314820233717369776491069",
                "33506854628087820398082003183209842231",
                "85318898541509326955690772481528013866"
            ]
        },
        "id": "CVE-2024-27010-3f0db0b1",
        "signature_type": "Line",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6b90468da4dae2281a6e381107f411efb48b0ef",
        "signature_version": "v1"
    },
    {
        "deprecated": false,
        "target": {
            "file": "net/core/dev.c",
            "function": "__dev_xmit_skb"
        },
        "digest": {
            "length": 1864.0,
            "function_hash": "315744530365695781642129625138015551872"
        },
        "id": "CVE-2024-27010-62c461a1",
        "signature_type": "Function",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f022d32c3eca477fbf79a205243a6123ed0fe11",
        "signature_version": "v1"
    },
    {
        "deprecated": false,
        "target": {
            "file": "include/net/sch_generic.h"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "299970557524825245572375081236063373106",
                "92593349113273579724988938586459598901",
                "283767042139692648418329395062870847112",
                "50534455358958207701204585841855766449"
            ]
        },
        "id": "CVE-2024-27010-6a0ca61c",
        "signature_type": "Line",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f022d32c3eca477fbf79a205243a6123ed0fe11",
        "signature_version": "v1"
    },
    {
        "deprecated": false,
        "target": {
            "file": "include/net/sch_generic.h"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "299970557524825245572375081236063373106",
                "92593349113273579724988938586459598901",
                "283767042139692648418329395062870847112",
                "50534455358958207701204585841855766449"
            ]
        },
        "id": "CVE-2024-27010-928a23b4",
        "signature_type": "Line",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6b90468da4dae2281a6e381107f411efb48b0ef",
        "signature_version": "v1"
    },
    {
        "deprecated": false,
        "target": {
            "file": "net/sched/sch_generic.c",
            "function": "qdisc_alloc"
        },
        "digest": {
            "length": 1412.0,
            "function_hash": "281759684481034378545486730015134335196"
        },
        "id": "CVE-2024-27010-995da9b5",
        "signature_type": "Function",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6b90468da4dae2281a6e381107f411efb48b0ef",
        "signature_version": "v1"
    },
    {
        "deprecated": false,
        "target": {
            "file": "net/core/dev.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "53298560351014202099411594189678347566",
                "184891801393182576858353012778763796436",
                "328942525527325642159282736362970707712",
                "292303773815440850038985657017866483001",
                "207777653581622644935454574263284681535",
                "238373890031548314820233717369776491069",
                "33506854628087820398082003183209842231",
                "85318898541509326955690772481528013866"
            ]
        },
        "id": "CVE-2024-27010-cad48ebe",
        "signature_type": "Line",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f022d32c3eca477fbf79a205243a6123ed0fe11",
        "signature_version": "v1"
    },
    {
        "deprecated": false,
        "target": {
            "file": "net/sched/sch_generic.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "204775788981766623941531065637563920508",
                "267507467991638448482262099305671544228",
                "320253107906805258821730962739085286474",
                "279206105712833574460981402327093733954"
            ]
        },
        "id": "CVE-2024-27010-dce10b28",
        "signature_type": "Line",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6b90468da4dae2281a6e381107f411efb48b0ef",
        "signature_version": "v1"
    },
    {
        "deprecated": false,
        "target": {
            "file": "net/sched/sch_generic.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "204775788981766623941531065637563920508",
                "267507467991638448482262099305671544228",
                "320253107906805258821730962739085286474",
                "279206105712833574460981402327093733954"
            ]
        },
        "id": "CVE-2024-27010-f33d327d",
        "signature_type": "Line",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f022d32c3eca477fbf79a205243a6123ed0fe11",
        "signature_version": "v1"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.2.0
Fixed
6.8.8