AZL-115531: CVE-2026-99690 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: cache the mount context for dentry lock callbacks
ocfs2dropdentrylock() drops the inode reference before releasing the DENTRY lock. This lets inode eviction release the local inode and open locks before a remote unlink can proceed past the DENTRY lock.
A DLM callback can still arrive before the DENTRY lock has been dropped. ocfs2getdentryosb() obtains the mount context through dlinode->isb, which can access a freed inode when the downconvert thread drops the last inode reference in its post-unlock callback:
Downconvert thread DLM callback thread ------------------ ------------------- ocfs2processblockedlock() ocfs2dentrypostunlock() ocfs2dentrylockput() ocfs2dropdentrylock() iput(dl->dlinode) [inode reclaimed after RCU] ocfs2blockingast() ocfs2getdentryosb() dl->dlinode->isb ocfs2simpledroplockres()
Store the mount context in the DENTRY lock resource's lpriv field and use the default mount-context lookup. Recover the containing dentry lock with containerof(), as already done for refcount locks, and remove ocfs2getdentryosb(). ocfs2dismountvolume() shuts down the DLM before freeing the mount context, so callbacks can use it without accessing the inode. Preserve the existing iput-before-unlock order to avoid delaying local inode and open lock release until after the DENTRY lock is released.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In ocfs2, store the mount context in the DENTRY lock resource’s l_priv field, recover it with container_of() for lock callbacks, and avoid obtaining it through dl->dl_inode->i_sb. Preserve the iput-before-unlock order.