From: David Howells <dhowells@redhat.com>
To: Dave Wysochanski <dwysocha@redhat.com>
Cc: dhowells@redhat.com, linux-cachefs@redhat.com,
jlayton@kernel.org, smfrench@gmail.com,
linux-cifs@vger.kernel.org
Subject: Re: [PATCH v2] cachefiles: Fix KASAN slab-out-of-bounds in cachefiles_set_volume_xattr
Date: Fri, 08 Apr 2022 23:13:59 +0100 [thread overview]
Message-ID: <755950.1649456039@warthog.procyon.org.uk> (raw)
In-Reply-To: <20220405142810.8208-1-dwysocha@redhat.com>
Dave Wysochanski <dwysocha@redhat.com> 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
prev parent reply other threads:[~2022-04-08 22:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 14:28 [PATCH v2] cachefiles: Fix KASAN slab-out-of-bounds in cachefiles_set_volume_xattr Dave Wysochanski
2022-04-05 15:14 ` Jeff Layton
2022-04-08 22:13 ` David Howells [this message]
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=755950.1649456039@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=dwysocha@redhat.com \
--cc=jlayton@kernel.org \
--cc=linux-cachefs@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=smfrench@gmail.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