lkml.org 
[lkml]   [2020]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: fix fs/quota/dquot.c oops error
On Mon 02-11-20 16:38:00, 1 wrote:
> An oops error will appear if you follow the steps below:
> 1.gcc -o test test.c
> 2.sudo ./test
>
>
> The error can be found in the dmesg file , in the function of
> "dquot_add_space". Because a pointer named "dquot" is illegal , so it
> need to use functions to detect the pointer. Through the test, it is
> found that this function named "access_ok" meets the requirements.

Thanks for the patch but it is not correct. A proper fix for this syzbot
reproducer is to add more sanity checking into quota code to verify quota
file headers are not corrupted. Because these corrupted headers cause bogus
return values from get_free_blk() and possibly other quota functions which
then confuse __dquot_initialize().

Honza

--
Jan Kara <jack@suse.com>
SUSE Labs, CR

\
 
 \ /
  Last update: 2020-11-02 16:05    [W:0.023 / U:2.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site