PT-2026-163431
CVE-2026-139390
·
تاريخ النشر
2026-11-30
·
تاريخ التحديث
2026-11-30
الوصف من
الدرجة
N/A
غير متوفرلا تتوفر حاليًا تقييمات أو مقاييس للخطورة. سنحدّث المعلومات المقابلة في الصفحة فور توفرها.
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: fix possible deadlock between nfs sync rwlock and fs reclaim
syzbot detected a circular locking dependency on &osb->nfs sync rwlock:
CPU0 CPU1
---- ----lock(fs reclaim);
lock(&ocfs2 sysfile lock key[INODE ALLOC SYSTEM INODE]);
lock(fs reclaim);
rlock(&osb->nfs sync rwlock);
*** DEADLOCK ***
Chain exists of:
&osb->nfs sync rwlock --> &ocfs2 sysfile lock key[INODE ALLOC SYSTEM INODE] --> fs reclaim
CPU0 is kswapd. The dentry shrinker runs under fs reclaim and reaches
ocfs2 delete inode() through ->evict inode():
kswapd
balance pgdat
shrink node
shrink slab
super cache scan
prune dcache sb
shrink dentry list
dentry kill
ocfs2 dentry iput
evict
ocfs2 evict inode
ocfs2 delete inode
ocfs2 nfs sync lock
down read(&osb->nfs sync rwlock) //C0: grabbing
CPU1 is a task deleting an inode. It takes nfs sync rwlock first, then
the orphan dir and inode alloc system inode i rwsems, and allocates the
metadata reservation with GFP KERNEL while holding them:
evict
ocfs2 evict inode
ocfs2 delete inode
- ocfs2 nfs sync lock | down read(&osb->nfs sync rwlock) //C1: hold
- ocfs2 wipe inode
- inode lock(orphan dir inode) //C1: hold
- ocfs2 truncate for delete | ocfs2 commit truncate | ocfs2 remove btree range | ocfs2 reserve blocks for rec trunc | ocfs2 reserve new metadata blocks | kzalloc obj() //C1: grabbing | // GFP KERNEL -> might alloc -> fs reclaim acquire
- ocfs2 remove inode inode lock(inode alloc inode)
jbd2 pins allocations to GFP NOFS for the lifetime of a transaction
handle, but these reservations are made before ocfs2 start trans(), so
fs reclaim is acquired with ocfs2 locks still held and the cycle closes.
The same cycle is reachable from ocfs2 get dentry() and
ocfs2 get parent(), which hold nfs sync rwlock for write across
ocfs2 test inode bit() and ocfs2 iget().
This is more than a lockdep artifact. A GFP KERNEL allocation under the
orphan dir i rwsem enters direct reclaim, which runs the shrinkers, which
can evict another ocfs2 inode and re-enter ocfs2 wipe inode() on the same
task; the second inode lock() on the singleton orphan dir inode then
self-deadlocks, since i rwsem is not recursive.
Establish a GFP NOFS allocation context for the whole nfs sync rwlock
critical section so that nothing holding it can recurse into filesystem
reclaim. Do it in ocfs2 nfs sync lock()/ocfs2 nfs sync unlock() rather
than at the call sites, so that future callers cannot forget it.
وجدت خطأً في الوصف؟ لديك ما تضيفه؟ لا تتردد في مراسلتنا 👾