Messages in this thread | | | Date | Wed, 29 Jul 2020 15:58:20 +0300 | From | Dan Carpenter <> | Subject | Re: [Linux-kernel-mentees] [PATCH v2] block/floppy: Prevent kernel-infoleak in raw_cmd_copyout() |
| |
Argh... This isn't right still. The "ptr" comes from raw_cmd_copyin()
ptr = kmalloc(sizeof(struct floppy_raw_cmd), GFP_KERNEL);
The struct hole could still be uninitialized from kmalloc() and instead of from the stack. Smatch is only looking for the common stack info leaks and doesn't worn about holes in kmalloc()ed memory.
regards, dan carpenter
| |