mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Roi Martin <jroi.martin@gmail.com>
Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix uninit pointer free on read_alloc_one_name error
Date: Fri, 11 Oct 2024 18:09:40 +0200	[thread overview]
Message-ID: <20241011160940.GY1609@twin.jikos.cz> (raw)
In-Reply-To: <20241010194717.1536428-1-jroi.martin@gmail.com>

On Thu, Oct 10, 2024 at 09:47:17PM +0200, Roi Martin wrote:
> The read_alloc_one_name function does not initialize the name field of
> the passed fscrypt_str struct if kmalloc fails to allocate the
> corresponding buffer.  Thus, it is not guaranteed that
> fscrypt_str.name is initialized when freeing it.
> 
> This is a follow-up to the linked patch that fixes the remaining
> instances of the bug introduced by commit e43eec81c516 ("btrfs: use
> struct qstr instead of name and namelen pairs").
> 
> Link: https://lore.kernel.org/linux-btrfs/20241009080833.1355894-1-jroi.martin@gmail.com/
> Fixes: e43eec81c516 ("btrfs: use struct qstr instead of name and namelen pairs")
> Signed-off-by: Roi Martin <jroi.martin@gmail.com>

Added to for-next, thanks.

      parent reply	other threads:[~2024-10-11 16:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10 19:47 Roi Martin
2024-10-10 23:57 ` Anand Jain
2024-10-11 16:09 ` David Sterba [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=20241011160940.GY1609@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=jroi.martin@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®