DF-3569 / manifest.json
{ "finding_id": "DF-3569", "file": "sys/crypto/camellia/camellia-api.c", "title": "camellia_set_key() accepts any key length: no API-boundary validation of bits; on production kernels an invalid length yields an never-generated schedule and identity-function encryption", "verdict": "reproduced", "impact": "none", "confidence": "certain", "reproduce": { "build": "cd /tmp/df3569 && cc -O2 -DNDEBUG -I /usr/src/sys -o guard_prod guard_cam_badbits.c /usr/src/sys/crypto/camellia/camellia-api.c /usr/src/sys/crypto/camellia/camellia.c (plus guard_dbg without -DNDEBUG and guard_fix from a fix.diff-patched source copy; see build.sh)", "run": "./guard_prod kat; ./guard_prod guard; ./guard_dbg guard; ./guard_fix kat; ./guard_fix guard (see run.sh)", "expected": "prod guard: BUG-CONFIRMED exit 42 (ctx->bits stores invalid length, schedule sentinel intact = never generated, ciphertext == plaintext); dbg guard: KASSERT assert abort at camellia.c:1254; fix kat: RESULT-PASS 0 failures; fix guard: BUG-NOT-PRESENT exit 0" }, "kernel_refs": [ "sys/crypto/camellia/camellia-api.c:36", "sys/crypto/camellia/camellia-api.c:40", "sys/crypto/camellia/camellia-api.c:41", "sys/crypto/camellia/camellia-api.c:44", "sys/crypto/camellia/camellia-api.c:51", "sys/crypto/camellia/camellia.h:36", "sys/crypto/camellia/camellia.h:41", "sys/crypto/camellia/camellia.c:1249", "sys/crypto/camellia/camellia.c:1253", "sys/crypto/camellia/camellia.c:1266", "sys/crypto/camellia/camellia.c:1271", "sys/crypto/camellia/camellia.c:1303", "sys/conf/files:2259", "sys/crypto/Makefile:20" ], "artifacts": [ "README.md", "VERDICT.md", "guard_cam_badbits.c", "fix.diff", "build.sh", "run.sh", "build.log", "run.log", "fixval.log", "env.txt", "manifest.json", "verdict.json" ] } |