Re: [PATCH] nvme-fabrics: fix DHCHAP secret leak on parse failure
Christoph Hellwig <[email protected]>
| Newsgroups | org.infradead.lists.linux-nvme,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Aug 13, 2026 at 04:31:07PM +0800, raoxu wrote: > From: Xu Rao <[email protected]> > > nvmf_parse_options() duplicates dhchap_secret and dhchap_ctrl_secret > with match_strdup() before validating the DHHC-1: representation. Looks good: Reviewed-by: Christoph Hellwig <[email protected]> Btw, I think the size and structure of nvmf_parse_options helped to get to this. If you are interested in a little improvement project in this area, it would be nice to add a separate helper for the parsing of each option so that the strdup allocations are limited to that scope (and don't reuse the p variable used for the token).