From: Matthew Wilcox <willy@infradead.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-fsdevel@vger.kernel.org,
syzbot+1631f09646bc214d2e76@syzkaller.appspotmail.com,
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
ntfs3@lists.linux.dev, Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Kari Argillander <kari.argillander@stargateuniverse.net>,
Namjae Jeon <linkinjeon@kernel.org>
Subject: Re: [PATCH v2] fs/ntfs3: validate BOOT sectors_per_clusters
Date: Fri, 29 Apr 2022 21:02:59 +0100 [thread overview]
Message-ID: <YmxEc3jLLylGqxsD@casper.infradead.org> (raw)
In-Reply-To: <20220429200100.22659-1-rdunlap@infradead.org>
On Fri, Apr 29, 2022 at 01:01:00PM -0700, Randy Dunlap wrote:
> When the NTFS BOOT sectors_per_clusters field is > 0x80,
> it represents a shift value. Make sure that the shift value is
> not too large (> 31) before using it. Return 0xffffffff if it is.
>
> This prevents negative shift values and shift values that are
> larger than the field size.
>
> Prevents this UBSAN error:
>
> UBSAN: shift-out-of-bounds in ../fs/ntfs3/super.c:673:16
> shift exponent -192 is negative
>
> Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: syzbot+1631f09646bc214d2e76@syzkaller.appspotmail.com
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
next prev parent reply other threads:[~2022-04-29 20:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-29 20:01 [PATCH v2] fs/ntfs3: validate BOOT sectors_per_clusters Randy Dunlap
2022-04-29 20:02 ` Matthew Wilcox [this message]
2022-04-30 2:40 ` Namjae Jeon
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=YmxEc3jLLylGqxsD@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=kari.argillander@stargateuniverse.net \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
--cc=rdunlap@infradead.org \
--cc=syzbot+1631f09646bc214d2e76@syzkaller.appspotmail.com \
--cc=viro@zeniv.linux.org.uk \
/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