Re: [PATCH v2] cachefiles: Fix KASAN slab-out-of-bounds in cachefiles_set_volume_xattr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave Wysochanski <dwysocha@xxxxxxxxxx> wrote:

> -	len += sizeof(*buf);
> -	buf = kmalloc(len, GFP_KERNEL);
> +	buf = kmalloc(sizeof(*buf) + len, GFP_KERNEL);

Okay, your V2 is wrong and your V1 is correct (len must include the reserverd
word so that it gets saved onto disk).

David




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux