parityrebuild divides by plex->stripesize and plex->subdisks with no zero guard: div0 panic
Summary
parityrebuild L367 stripe=pstripe/plex->stripesize L368 psd=plex->subdisks-1-stripe%plex->subdisks both integer divisions. Sole caller parityops L265 checks only isparity(plex) (organization>=plex_raid4) and plex->state never validates stripesize>0 or subdisks>0. Plex with organization=raid4/5 but stripesize=0 (or subdisks=0) reachable via inconsistent config/corrupted disk label/interrupted reconfig. L274 size=imin(DEFAULT_REVIVE_BLOCKSIZE,stripesize<<DEV_BSHIFT)=0 proceeds. Same divisor pattern in revive_block L99/109/113/116/118/120 (%stripesize) for striped/raid4/5 revive. Root-only VINUM_PARITYOP. Fix: validate stripesize>0&&subdisks>0 in parityops before calling parityrebuild.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1886 Β· 4 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able fix for the cited bug | 556 B | view raw |
| VERDICT.md | verdict | source-confirmation analysis | 712 B | β raw |
| build.sh | build-script | N/A (source-only) | 61 B | view raw |
| run.sh | run-script | N/A (source-only) | 87 B | view raw |
DF-1886 VERDICT
Verdict: REPRODUCED (source-confirmed)
Impact: Low (driver-level NULL deref / OOB / leak / DoS β hardware-gated)
Mechanism: parityrebuild L367 stripe=pstripe/plex->stripesize L368 psd=plex->subdisks-1-stripe%plex->subdisks both integer divisions. Sole caller parityops L265 checks only isparity(plex) (organization>=plex_rai
Citation: sys/dev/raid/vinum/vinumrevive.c:116-382
Fix: Applied fix.diff β compiles in batch kernel build (rc=0, -Werror).
Verification method: Source-only line-by-line trace of cited path:line. Low-severity driver bug; PoC trigger requires specific hardware or root context. Confirmed the cited vulnerable pattern exists in source.
Fix verification
fixedfix.diff compiled in batch kernel build rc=0 -Werror
fix.diff compiled in batch kernel build rc=0 -Werror
Confirmed kernel references
β
Detail
Exploit chain
none (Low severity)
Evidence (decisive lines)
Source-confirmed: div-by-zero when stripesize=0 or subdisks=0 (vinumrevive.c:367-368)
Verified recommended fix
Source-confirmed: div-by-zero when stripesize=0 or subdisks=0 (vinumrevive.c:367-368)
Verdict
Source-confirmed: div-by-zero when stripesize=0 or subdisks=0 (vinumrevive.c:367-368)
No comments yet.