mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: 1 <liuyingbiao1005@126.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, jack <jack@suse.com>
Subject: Re: fix fs/quota/dquot.c oops error
Date: Mon, 2 Nov 2020 16:04:39 +0100	[thread overview]
Message-ID: <20201102150439.GC23988@quack2.suse.cz> (raw)
In-Reply-To: <2a05b12f.5374.175881b20f4.Coremail.liuyingbiao1005@126.com>

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

           reply	other threads:[~2020-11-02 15:04 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <2a05b12f.5374.175881b20f4.Coremail.liuyingbiao1005@126.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201102150439.GC23988@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=jack@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyingbiao1005@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®