Re: [PATCH] module: Fix use-after-free bug in read_file_mod_stats()

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

 



On Thu, Apr 27, 2023 at 10:59:33PM -0700, Harshit Mogalapalli wrote:
> Smatch warns:
> 	kernel/module/stats.c:394 read_file_mod_stats()
> 	warn: passing freed memory 'buf'
> 
> We are passing 'buf' to simple_read_from_buffer() after freeing it.
> 
> Fix this by changing the order of 'simple_read_from_buffer' and 'kfree'.
> 
> Fixes: df3e764d8e5c ("module: add debug stats to help identify memory pressure")
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>
> ---

Queued up, thanks!

  Luis



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux