Skip to content
FlawDB
Sign in

CVE-2026-139677

UNSCORED

kernfs: don't hold kernfs_rwsem across dir_emit()

AI summary AI generated

In the Linux kernel's kernfs, holding a lock across directory entry emission to userspace can stall sysfs and cgroupfs operations under memory pressure; the fix releases the lock around dir_emit().

Mitigation

  • Upgrade Linux to 341c65579de5b632eb7913bb68b3e375eeeb3ddf or later.

Who should check

  • Anyone running Linux >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < a8c18ee33f5892e753e74001dcfb802a2f280831; >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < 18972293f131ef82eaf45f44c5599c3998292dfd; >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < 341c65579de5b632eb7913bb68b3e375eeeb3ddf
  • Anyone running Linux 6.15

Vulnerability facts

Affected
Linux >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < a8c18ee33f5892e753e74001dcfb802a2f280831; >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < 18972293f131ef82eaf45f44c5599c3998292dfd; >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < 341c65579de5b632eb7913bb68b3e375eeeb3ddf; Linux 6.15
Fixed in
Linux 18972293f131ef82eaf45f44c5599c3998292dfd, Linux 341c65579de5b632eb7913bb68b3e375eeeb3ddf
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Unknown
CVSS
Not scored yet
Published
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: kernfs: don't hold kernfs_rwsem across dir_emit() kernfs_fop_readdir() holds kernfs_rwsem for reading across the whole listing, dir_emit() included. dir_emit() copies to userspace, so it can fault into reclaim while holding the lock that every create, remove and rename in the hierarchy needs. sysfs and cgroupfs have one per machine. Under memory pressure the monitoring daemons fault on their own getdents(2) buffer with it held: below: page allocation stall for 120 secs: order:0, mode:0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|__GFP_COMP) nodemask=(null),cpuset=hostcritical.slice,mems_allowed=0 Call Trace: <TASK> dump_stack_lvl+0x5d/0x80 __alloc_frozen_pages_noprof+0x5f4d/0x6300 ? memcg_list_lru_alloc+0x73/0x320 ? ima_file_check+0xd0/0x7d0 vma_alloc_folio_noprof+0x145/0x560 handle_mm_fault+0x17c9/0x2720 ? find_vma+0x27/0x30 do_user_addr_fault+0x39f/0x6e0 exc_page_fault+0x8f/0x110 asm_exc_page_fault+0x22/0x30 RIP: 0010:filldir64+0xd7/0x1a0 [Code:/RSP:/RAX:..R15: register block elided] kernfs_fop_readdir+0x2de/0x420 iterate_dir+0x8c/0x1f0 __se_sys_getdents64+0x61/0xe0 ? copy_page_from_iter+0x860/0x860 do_syscall_64+0x6a/0x250 entry_SYSCALL_64_after_hwframe+0x4b/0x53 </TASK> Commit 9aab10a0249e ("kernfs: Don't re-lock kernfs_root::kernfs_rwsem in kernfs_fop_readdir().") took the lock drop out because dir_emit() was handed kernfs_node::name, which a rename can free. The previous patch emits a copy instead, so drop the lock around dir_emit(). A listing is no longer atomic within one getdents(2) call, which for most sysfs and cgroup directories is all of it. POSIX leaves that unspecified for an entry added or removed since opendir(3).

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < a8c18ee33f5892e753e74001dcfb802a2f280831; >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < 18972293f131ef82eaf45f44c5599c3998292dfd; >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < 341c65579de5b632eb7913bb68b3e375eeeb3ddf—cvelist
Linux6.15—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2026-139677. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-139677.md
Affected: Linux >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < a8c18ee33f5892e753e74001dcfb802a2f280831; >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < 18972293f131ef82eaf45f44c5599c3998292dfd; >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < 341c65579de5b632eb7913bb68b3e375eeeb3ddf; Linux 6.15
Fixed in: Linux 18972293f131ef82eaf45f44c5599c3998292dfd, Linux 341c65579de5b632eb7913bb68b3e375eeeb3ddf

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

Technologies

References

FAQ

Is CVE-2026-139677 being exploited?

There is no confirmed exploitation: CVE-2026-139677 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

How serious is CVE-2026-139677?

It has no CVSS score yet. Unknown.

Which versions are affected by CVE-2026-139677?

Linux >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < a8c18ee33f5892e753e74001dcfb802a2f280831; >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < 18972293f131ef82eaf45f44c5599c3998292dfd; >= 9aab10a0249eab4ec77c6a5e4f66442610c12a09, < 341c65579de5b632eb7913bb68b3e375eeeb3ddf; Linux 6.15.

Is there a fix for CVE-2026-139677?

Yes. Fixed in Linux 18972293f131ef82eaf45f44c5599c3998292dfd, Linux 341c65579de5b632eb7913bb68b3e375eeeb3ddf. Upgrade Linux to 341c65579de5b632eb7913bb68b3e375eeeb3ddf or later.

How do I check if I'm affected by CVE-2026-139677?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

See all
Vulnerabilities, newest first
SeverityIdentifier / vulnerabilityTechnologySignalsAge
MEDIUM 6.5CVE-2026-140063

Glib2: authenticated dos via pre-emptive 128mib read-buffer allocation in gdbusworker

Linux kernel+1
MEDIUM 5.1CVE-2026-140038

Binutils: gprofng uses predictable /tmp directory with unchecked mkdir() enabling symlink-based file clobber

Linux kernel+1
HIGH 7.3CVE-2026-139801

KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM

Linux kernel
UNSCOREDCVE-2026-139800

9p/xen: drain response work after unbinding IRQ

Linux kernel
HIGH 7.0CVE-2026-139799

mm/shmem: hold off eviction in shmem_writeout()

Linux kernel
Sponsors