DF-5712 / manifest.json
{ "verdict": "reproduced", "impact": "none", "finding": "DF-5712: kernel index/rindex omit the ISO C (char) conversion of the search argument, diverging from strchr/strrchr for ch outside [-128,127] (never match where libc truncates and matches); latent — no in-tree caller searches high-bit bytes", "reproduce": { "build": "in DragonFly guest: stage files in /tmp/df5712 and run `sh build.sh` (compiles /usr/src/sys/libkern/{index,rindex}.c verbatim, renamed -Dindex=k_index/-Drindex=k_rindex, plus one-char-fix copies)", "run": "`sh run.sh` (executes ./diffharness)", "expected": "BASELINE_TOTAL_MISMATCHES=116 ; CH0_SEMANTICS: OK ; GUARDPAGE_RESULT: byte-exact, halts at NUL (0 unexpected faults) ; PATCHED_TOTAL_MISMATCHES=0" }, "kernel_refs": [ "sys/libkern/index.c:46", "sys/libkern/rindex.c:47", "sys/sys/libkern.h:164", "sys/sys/libkern.h:170" ], "artifacts": [ "diffharness.c", "build.sh", "run.sh", "build.log", "run.log", "run.2.log", "run.3.log", "env.txt", "fix.diff", "VERDICT.md", "manifest.json", "verdict.json" ] } |