CVE-2024-57891

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-57891
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57891.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-57891
Downstream
Published
2025-01-15T13:05:43.607Z
Modified
2025-11-20T07:20:18.653917Z
Summary
sched_ext: Fix invalid irq restore in scx_ops_bypass()
Details

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

schedext: Fix invalid irq restore in scxops_bypass()

While adding outer irqsave/restore locking, 0e7ffff1b811 ("scx: Fix raciness in scxopsbypass()") forgot to convert an inner rqunlockirqrestore() to rq_unlock() which could re-enable IRQ prematurely leading to the following warning:

rawlocalirqrestore() called with IRQs enabled WARNING: CPU: 1 PID: 96 at kernel/locking/irqflag-debug.c:10 warnbogusirqrestore+0x30/0x40 ... Schedext: createdsq (enabling) pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : warnbogusirqrestore+0x30/0x40 lr : warnbogusirqrestore+0x30/0x40 ... Call trace: warnbogusirqrestore+0x30/0x40 (P) warnbogusirqrestore+0x30/0x40 (L) scxopsbypass+0x224/0x3b8 scxopsenable.isra.0+0x2c8/0xaa8 bpfscxreg+0x18/0x30 ... irq event stamp: 33739 hardirqs last enabled at (33739): [<ffff8000800b699c>] scxopsbypass+0x174/0x3b8 hardirqs last disabled at (33738): [<ffff800080d48ad4>] rawspinlockirqsave+0xb4/0xd8

Drop the stray _irqrestore().

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
0e7ffff1b8117b05635c87d3c9099f6aa9c9b689
Fixed
786362ce60d79967875f43e0ba55ad7a5376c133
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0e7ffff1b8117b05635c87d3c9099f6aa9c9b689
Fixed
18b2093f4598d8ee67a8153badc93f0fa7686b8a

Affected versions

v6.*

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.2
v6.12.3
v6.12.4
v6.12.5
v6.12.6
v6.12.7
v6.12.8
v6.13-rc1

Database specific

vanir_signatures

[
    {
        "signature_type": "Line",
        "deprecated": false,
        "id": "CVE-2024-57891-63e74c70",
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@786362ce60d79967875f43e0ba55ad7a5376c133",
        "digest": {
            "line_hashes": [
                "247482124856869687812732564031364298067",
                "159938720249671164136036292062280932140",
                "183115593076830564691230557532815280161",
                "287649549381677109655172740117874534171"
            ],
            "threshold": 0.9
        },
        "target": {
            "file": "kernel/sched/ext.c"
        }
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.12.0
Fixed
6.12.9