{"id":"CVE-2026-100092","aliases":["CVE-2026-100092"],"related":[],"kind":"vulnerability","state":"published","title":"f2fs: fix to use bio_in_atomic() in f2fs_read_end_io()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix to use bio_in_atomic() in f2fs_read_end_io()\n\nf2fs_read_end_io() uses \"in_task() && !irqs_disabled()\" to decide\nwhether it is safe to sleep, the result is passed down as @in_task to:\n- f2fs_put_dic() -> f2fs_free_dic() -> f2fs_release_decomp_mem()\n  -> vm_unmap_ram(), which may sleep.\n- f2fs_end_read_compressed_page() -> f2fs_cache_compressed_page()\n  -> f2fs_grab_cache() -> f2fs_lock_cache(), which may sleep in\n  wait_on_bit_lock().\n\nHowever, the check still treats below task contexts as sleepable:\n- with spinlock held via spin_lock(), i.e. preempt count != 0 while\n  irqs are enabled.\n- with BH disabled via local_bh_disable().\n- inside an RCU read lock on kernels with CONFIG_PREEMPTION.\n- with any spinlock held on kernels without CONFIG_PREEMPT_COUNT.\n\nSo the \"sleeping function called from invalid context\" issue fixed by\ncommit 08a7efc5b02a (\"f2fs: vm_unmap_ram() may be called from an\ninvalid context\") can still be triggered.\n\nThe block layer provides bio_in_atomic() for exactly this purpose, it\nchecks rcu_preempt_depth() and preemptible(), and conservatively returns\ntrue if CONFIG_PREEMPT_COUNT is disabled, let's use it instead. The\ndifference is as below:\n\n old: intask = in_task() && !irqs_disabled()\n new: intask = !bio_in_atomic()\n\n Context                              | old intask     | new intask\n -------------------------------------+----------------+----------------\n Hard IRQ / softirq                   | false          | false\n IRQs disabled                        | false          | false\n spin_lock() held, IRQs enabled       | true (wrong)   | false\n BH disabled by local_bh_disable()    | true (wrong)   | false\n RCU read lock (CONFIG_PREEMPTION)    | true (wrong)   | false\n Spinlock held, w/o PREEMPT_COUNT     | true (wrong)   | false\n\nNote that on kernels without CONFIG_PREEMPT_COUNT, bio_in_atomic()\nalways returns true, so dic freeing will always be offloaded to sbi->wq,\nand compressed pages will not be cached in f2fs_read_end_io(); this is\nthe price of correctness, since there is no way to tell whether the\ncurrent context can sleep.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix to use bio_in_atomic() in f2fs_read_end_io()\n\nf2fs_read_end_io() uses \"in_task() && !irqs_disabled()\" to decide\nwhether it is safe to sleep, the result is passed down as @in_task to:\n- f2fs_put_dic() -> f2fs_free_dic() -> f2fs_release_decomp_mem()\n  -> vm_unmap_ram(), which may sleep.\n- f2fs_end_read_compressed_page() -> f2fs_cache_compressed_page()\n  -> f2fs_grab_cache() -> f2fs_lock_cache(), which may sleep in\n  wait_on_bit_lock().\n\nHowever, the check still treats below task contexts as sleepable:\n- with spinlock held via spin_lock(), i.e. preempt count != 0 while\n  irqs are enabled.\n- with BH disabled via local_bh_disable().\n- inside an RCU read lock on kernels with CONFIG_PREEMPTION.\n- with any spinlock held on kernels without CONFIG_PREEMPT_COUNT.\n\nSo the \"sleeping function called from invalid context\" issue fixed by\ncommit 08a7efc5b02a (\"f2fs: vm_unmap_ram() may be called from an\ninvalid context\") can still be triggered.\n\nThe block layer provides bio_in_atomic() for exactly this purpose, it\nchecks rcu_preempt_depth() and preemptible(), and conservatively returns\ntrue if CONFIG_PREEMPT_COUNT is disabled, let's use it instead. The\ndifference is as below:\n\n old: intask = in_task() && !irqs_disabled()\n new: intask = !bio_in_atomic()\n\n Context                              | old intask     | new intask\n -------------------------------------+----------------+----------------\n Hard IRQ / softirq                   | false          | false\n IRQs disabled                        | false          | false\n spin_lock() held, IRQs enabled       | true (wrong)   | false\n BH disabled by local_bh_disable()    | true (wrong)   | false\n RCU read lock (CONFIG_PREEMPTION)    | true (wrong)   | false\n Spinlock held, w/o PREEMPT_COUNT     | true (wrong)   | false\n\nNote that on kernels without CONFIG_PREEMPT_COUNT, bio_in_atomic()\nalways returns true, so dic freeing will always be offloaded to sbi->wq,\nand compressed pages will not be cached in f2fs_read_end_io(); this is\nthe price of correctness, since there is no way to tell whether the\ncurrent context can sleep.","source":"cvelist"}],"published":"2026-11-30T13:23:42.225Z","modified":"2026-11-30T14:17:27.533Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"eb69e69a5ae6c8350957893b5f68bd55b1565fb2","fixed":"e08cb38f91a8f7cc4a6f96dfb0c3a4958a2227a6","status":"affected"},{"type":"git","introduced":"1023836d1b9465593c8746f97d608da32958785f","fixed":"4dd9b48ee2eb23d524d76cab670090fda5ae7bb7","status":"affected"},{"type":"git","introduced":"0fe7976b62546f1e95eebfe9879925e9aa22b7a8","fixed":"974a545e94e7b3c101ee1aaa9e0672655c94b598","status":"affected"},{"type":"git","introduced":"08a7efc5b02a0620ae16aa9584060e980a69cb55","fixed":"b7b1a54e3e1ade64a81a44d19e16cb76185d60b0","status":"affected"},{"type":"git","introduced":"08a7efc5b02a0620ae16aa9584060e980a69cb55","fixed":"f0abf244bcbb361b0d00a2ae4606294694c0e424","status":"affected"},{"type":"git","introduced":"08a7efc5b02a0620ae16aa9584060e980a69cb55","fixed":"a605d5d71a6d280c43c7ede9778dda63fb5c3f22","status":"affected"},{"type":"git","version":"411e00f44e2e1a7fdb526013b25a7f0ed22a0947","status":"affected"},{"type":"git","version":"18eea36f4f460ead3750ed4afe5496f7ce55f99e","status":"affected"},{"type":"semver","introduced":"6.1.148","fixed":"6.1.193","status":"affected"},{"type":"semver","introduced":"6.6.102","fixed":"6.6.163","status":"affected"},{"type":"semver","introduced":"6.12.42","fixed":"6.12.118","status":"affected"},{"type":"semver","introduced":"6.15.10","fixed":"6.16","status":"affected"},{"type":"semver","introduced":"6.16.1","fixed":"6.17","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.17","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.118","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.64","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/e08cb38f91a8f7cc4a6f96dfb0c3a4958a2227a6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4dd9b48ee2eb23d524d76cab670090fda5ae7bb7","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/974a545e94e7b3c101ee1aaa9e0672655c94b598","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b7b1a54e3e1ade64a81a44d19e16cb76185d60b0","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f0abf244bcbb361b0d00a2ae4606294694c0e424","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a605d5d71a6d280c43c7ede9778dda63fb5c3f22","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-100092","url":"https://www.cve.org/CVERecord?id=CVE-2026-100092","licence":"CVE Terms of Use","modified":"2026-11-30T13:23:42.225Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-100092","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-100092","licence":"Public domain","modified":"2026-11-30T14:17:27.533Z"}],"updatedAt":"2026-11-30T14:32:21.612Z","epss":{"score":0.00181,"percentile":0.08008,"date":"2026-12-01T12:00:22.000Z"}}