Views
No views yet
strlen() OOB read PoCllama.cpp because strlen() is called on an unterminated replacement string from tokenizer.ggml.precompiled_charsmap."A" triggers an out-of-bounds heap read in native code95e5254c0ae93529b2f6c05e210b9cac5c0070fcbuild_malicious_t5_charsmap_strlen.py: helper to generate t5-precompiled-charsmap-strlen-oob.ggufpoc_vocab_tokenize_loader.cpp: minimal vocab-loading and tokenization harness using product codebuild_stubs.cpp: small helper stubs needed by the reduced harness buildA and a replacement offset that points to the last byte of the attacker-controlled prefix-replacement region without a NUL terminator. The tokenizer later calls strlen() on that pointer while normalizing "A".t5-precompiled-charsmap-strlen-oob.gguf with build_malicious_t5_charsmap_strlen.py. Then build a small ASAN/UBSAN-instrumented loader from product sources together with poc_vocab_tokenize_loader.cpp and build_stubs.cpp, and run:1ASAN_OPTIONS=detect_leaks=0 \
2./poc_vocab_tokenize_loader ./t5-precompiled-charsmap-strlen-oob.ggufERROR: AddressSanitizer: heap-buffer-overflowREAD of size 2strlenllm_tokenizer_ugm_session::normalize_prefix