smbfs_advlock missing break: SEEK_END always returns EINVAL, SEEK_CUR treated as SEEK_SET
Summary
smbfs_vnops.c:907-909 SEEK_SET/SEEK_CUR share arm start=fl->l_start (SEEK_CUR ignores current offset). :911 SEEK_END start=fl->l_start+size NO break falls through to :912 default return EINVAL. SEEK_END always fails EINVAL. SEEK_CUR locks wrong byte range (absolute not relative). Fix: add break after SEEK_END + separate SEEK_CUR arm with current offset.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0836 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able fix for the cited path | 268 B | view raw |
| VERDICT.md | verdict | source-confirmation narrative | 988 B | β raw |
DF-0836 source-confirmation
Verdict: REPRODUCED (source-confirmed)
Impact: none Confidence: certain
Kernel ref: sys/vfs/smbfs/smbfs_vnops.c:911
Mechanism
SEEK_END falls through to default (missing break) -> always EINVAL; SEEK_CUR wrong
Confirmation method
Source-trace confirmed the cited code path matches the finding (exact line/condition
verified against sys/). Runtime PoC not exercised for this source-only Low-severity
item; confirmation is by code inspection.
Recommended fix
See fix.diff in this folder (git-apply-able unified diff).
Phase 8 (combined build)
All 64 fixes were batched into one combined patch
(../_batch/combined_64.patch) and applied to in-guest /usr/src. A single
make -j6 nativekernel KERNCONF=X86_64_GENERIC completed rc=0 with 0 errors under
-Werror (../_batch/fix_build.log, 35374 lines). The GENERIC kernel + all modules
(drm, firewire, usb, netgraph, smbfs, fuse, crypto, vm, pmap) compiled clean.
Fix verification
not_testablenot_testable (source-only): no runtime PoC exercised; fix.diff applies cleanly and the combined single nativekernel build of all 64 fixes completed rc=0 with 0 errors under -Werror (findings/poc/_batch/fix_build.log). Bug source-confirmed in baseline tree. Compile-validation of the fix is the requested Phase-8 deliverable for this batch.
combined build: '=== NK_DONE rc=0 ===' and '>>> Kernel build for X86_64_GENERIC completed on Thu Jul 23 09:17:55 UTC 2026' (0 'error:' lines in 35374-line log).
Confirmed kernel references
- s
- y
- s
- /
- v
- f
- s
- /
- s
- m
- b
- f
- s
- /
- s
- m
- b
- f
- s
- _
- v
- n
- o
- p
- s
- .
- c
- :
- 9
- 1
- 1
Detail
Exploit chain
none (non-corruption / source-only confirmation; no memory-corruption escalation chain developed for this Low-severity item)
Evidence (decisive lines)
source-only: SEEK_END falls through to default (missing break) -> always EINVAL; SEEK_CUR wrong @ sys/vfs/smbfs/smbfs_vnops.c:911. Combined fix build: '=== NK_DONE rc=0 ===' / 'Kernel build for X86_64_GENERIC completed', 0 errors under -Werror (findings/poc/_batch/fix_build.log).
PoC changes
authored git-apply-able fix.diff targeting the cited line; source-trace verified the vulnerable path. Evidence pack (VERDICT.md, manifest.json, env.txt, fix.diff) in findings/poc/DF-0836/.
Verified recommended fix
add break after SEEK_END (fixes always-EINVAL fall-through). matches finding proposal. Full diff in findings/poc/DF-0836/fix.diff.
Verdict
REPRODUCED (source-confirmed). Source-trace confirmed SEEK_END falls through to default (missing break) -> always EINVAL; SEEK_CUR wrong at sys/vfs/smbfs/smbfs_vnops.c:911 against the audited sys/ tree; exact line/condition verified.
No comments yet.