{"id":"CVE-2026-98058","aliases":["CVE-2026-98058"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Mark syscall helpers as sleepable","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Mark syscall helpers as sleepable\n\nbpf_sys_bpf() executes the bpf(2) syscall body, which can take mutexes,\nallocate with GFP_KERNEL, and wait for an RCU grace period.\nbpf_sys_close() reaches close_fd() and filp_close(), which can sleep as\nwell.\n\nBoth helpers are limited to BPF_PROG_TYPE_SYSCALL, whose main program is\nsleepable. That does not make every callback sleepable: a syscall program\ncan register a bpf_timer callback, and the verifier checks that callback\nin a non-sleepable context while retaining the syscall helper set.\n\nWithout .might_sleep on the prototypes, such a callback can invoke\nbpf_sys_bpf() from hrtimer softirq context and trigger a\nscheduling-while-atomic failure. bpf_sys_close() is exposed through the\nsame missing context check.\n\nSet .might_sleep on both prototypes so the existing helper-context check\nrejects them from timer callbacks and other atomic regions. Calls from the\nsleepable main body remain valid.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Mark syscall helpers as sleepable\n\nbpf_sys_bpf() executes the bpf(2) syscall body, which can take mutexes,\nallocate with GFP_KERNEL, and wait for an RCU grace period.\nbpf_sys_close() reaches close_fd() and filp_close(), which can sleep as\nwell.\n\nBoth helpers are limited to BPF_PROG_TYPE_SYSCALL, whose main program is\nsleepable. That does not make every callback sleepable: a syscall program\ncan register a bpf_timer callback, and the verifier checks that callback\nin a non-sleepable context while retaining the syscall helper set.\n\nWithout .might_sleep on the prototypes, such a callback can invoke\nbpf_sys_bpf() from hrtimer softirq context and trigger a\nscheduling-while-atomic failure. bpf_sys_close() is exposed through the\nsame missing context check.\n\nSet .might_sleep on both prototypes so the existing helper-context check\nrejects them from timer callbacks and other atomic regions. Calls from the\nsleepable main body remain valid.","source":"cvelist"}],"published":"2026-09-25T10:24:04.190Z","modified":"2026-11-03T17:52:15.880Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-362"],"affected":[{"ranges":[{"type":"git","introduced":"79a7f8bdb159d9914b58740f3d31d602a6e4aca8","fixed":"9496d857205e60241034b798d7745ff8830ba599","status":"affected"},{"type":"git","introduced":"79a7f8bdb159d9914b58740f3d31d602a6e4aca8","fixed":"d8cfe9f71d302970ae393616960f2b3021d2b3b0","status":"affected"},{"type":"git","introduced":"79a7f8bdb159d9914b58740f3d31d602a6e4aca8","fixed":"65f636322ac402add6046c68e9ece77b9ffd71c9","status":"affected"},{"type":"git","introduced":"79a7f8bdb159d9914b58740f3d31d602a6e4aca8","fixed":"3408e98f06ce06ea6a58ca6c39da9c23f0029c06","status":"affected"},{"type":"git","introduced":"79a7f8bdb159d9914b58740f3d31d602a6e4aca8","fixed":"d05524794240b52fdc3b6c1220dd05505715824d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.14","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.114","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.57","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.7","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.14","fixed":"6.6.160"},{"status":"affected","introduced":"6.7","fixed":"6.12.114"},{"status":"affected","introduced":"6.13","fixed":"6.18.57"},{"status":"affected","introduced":"6.19","fixed":"7.2.7"},{"status":"affected","version":"7.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/9496d857205e60241034b798d7745ff8830ba599","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d8cfe9f71d302970ae393616960f2b3021d2b3b0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/65f636322ac402add6046c68e9ece77b9ffd71c9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3408e98f06ce06ea6a58ca6c39da9c23f0029c06","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d05524794240b52fdc3b6c1220dd05505715824d","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-98058","url":"https://www.cve.org/CVERecord?id=CVE-2026-98058","licence":"CVE Terms of Use","modified":"2026-10-21T12:54:19.435Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-98058","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98058","licence":"Public domain","modified":"2026-11-03T17:52:15.880Z"}],"updatedAt":"2026-11-25T22:59:41.039Z","epss":{"score":0.0012,"percentile":0.01982,"date":"2026-12-01T12:00:22.000Z"}}