google / kernel-sanitizers

Linux Kernel Sanitizers, fast bug-detectors for the Linux kernel
https://google.github.io/kernel-sanitizers/
437 stars 87 forks source link

unified header for reports #40

Closed dvyukov closed 6 years ago

dvyukov commented 8 years ago

For one set of reports we print:

BUG: KASAN: slab-out-of-bounds in memcpy+0x1d/0x40 at addr ffff88003a6bd110
Read of size 8 by task a.out/6260

for another:

BUG: KASAN: null-ptr-deref on address           (null)
Read of size 4 by task syz-executor/22534

This complicates parsing, and the the second case we don't have a function name which complicates unique identification of bugs: null-ptr-deref is too vague, two such bugs may or may not be the same.

We should always print the first form:

KASAN: {TYPE} in {FUNC} at addr {ADDR}
(Read|Write) of size {SIZE} by task
xairy commented 6 years ago

Fixed by https://github.com/torvalds/linux/commit/7d418f7b0d3407b93ec70f3b380cc5beafa1fa68