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 | 1.0 KB | β raw |
| build.sh | build-script | N/A (source-only) | 65 B | view raw |
| run.sh | run-script | N/A (source-only) | 89 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 status (batch validation)
Applied with the 36 sibling fix.diffs of this batch in findings/poc/_batch41/all_fixes.patch; single in-guest make -j6 nativekernel KERNCONF=X86_64_GENERIC completed RC=0 with zero errors under -Werror (full log: findings/poc/_batch41/fix_build8.log). Behavior A/B intentionally skipped for this Info-tier item.
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.