Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: raoxu <raoxu@uniontech.com>
Cc: axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] nvme-fabrics: fix DHCHAP secret leak on parse failure
Date: Wed, 19 Aug 2026 09:34:03 -0600	[thread overview]
Message-ID: <aoXM61XULtnUeVg5@kbusch-mbp> (raw)
In-Reply-To: <66356C8F993780EC+20260813083107.2078333-1-raoxu@uniontech.com>

On Thu, Aug 13, 2026 at 04:31:07PM +0800, raoxu wrote:
> From: Xu Rao <raoxu@uniontech.com>
> 
> nvmf_parse_options() duplicates dhchap_secret and dhchap_ctrl_secret
> with match_strdup() before validating the DHHC-1: representation.
> 
> If validation fails, the parser returns -EINVAL before the temporary
> string in p is assigned to opts->dhchap_secret or
> opts->dhchap_ctrl_secret. nvmf_create_ctrl() subsequently frees opts,
> but nvmf_free_options() cannot release the unassigned temporary string.
> Each rejected option therefore leaks one allocation.

Thanks, applied to nvme-7.3.


      parent reply	other threads:[~2026-08-19 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  8:31 [PATCH] nvme-fabrics: fix DHCHAP secret leak on parse failure raoxu
2026-08-17  7:36 ` Christoph Hellwig
2026-08-19 15:34 ` Keith Busch [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=aoXM61XULtnUeVg5@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=raoxu@uniontech.com \
    --cc=sagi@grimberg.me \
    --cc=stable@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