DF-0909
Memory leak of dirfs_mount structure on mount-time stat failure
Summary
dirfs_vfsops.c:148-150 stat-fail branch goto failure without kfree(dmp). Other error paths (:131 copyinstr :144 not-dir) do kfree. VFS framework does NOT call VFS_UNMOUNT on mount failure (vfs_syscalls.c:456-474). Each mount against nonexistent path leaks sizeof(dirfs_mount). Fix: add kfree(dmp) to stat-fail branch.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0909 Β· 1 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | Memory leak of dirfs_mount structure on mount-time stat failure | 244 B | view raw |
Fix verification
fixedbaseline reproducedβ patch + rebuild βpatched clean
fix.diff applied + combined nativekernel build rc=0 (-Werror)
fix.diff applied + combined nativekernel build rc=0 (-Werror)
β fix.diffcombined build rc=0
Confirmed kernel references
β
Detail
Exploit chain
none (Info severity)
Evidence (decisive lines)
Source-confirmed at sys/vfs/dirfs/dirfs_vfsops.c:148: memory leak of dirfs_mount structure on mount-time stat failure
Verified recommended fix
Source-confirmed at sys/vfs/dirfs/dirfs_vfsops.c:148: memory leak of dirfs_mount structure on mount-time stat failure
Verdict
Source-confirmed at sys/vfs/dirfs/dirfs_vfsops.c:148: memory leak of dirfs_mount structure on mount-time stat failure
No comments yet.