Skip to content

nvmet-tcp: Ensure old keys are freed before replacing new ones#744

Open
blktests-ci[bot] wants to merge 1 commit intolinus-master_basefrom
series/1081786=>linus-master
Open

nvmet-tcp: Ensure old keys are freed before replacing new ones#744
blktests-ci[bot] wants to merge 1 commit intolinus-master_basefrom
series/1081786=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented Apr 15, 2026

Pull request for series with
subject: nvmet-tcp: Ensure old keys are freed before replacing new ones
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1081786

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 15, 2026

Upstream branch: d60bc14
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081786
version: 1

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 16, 2026

Upstream branch: d60bc14
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081786
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081786=>linus-master branch from 26dd3a4 to f51b56e Compare April 16, 2026 05:24
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 6b4d829 to ceec5ed Compare April 21, 2026 06:51
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 21, 2026

Upstream branch: b4e0758
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081786
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081786=>linus-master branch from f51b56e to bfabb65 Compare April 21, 2026 07:02
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from ceec5ed to 3b54e52 Compare April 22, 2026 20:20
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 22, 2026

Upstream branch: 6596a02
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081786
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081786=>linus-master branch from bfabb65 to b1a7eac Compare April 22, 2026 20:24
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 3b54e52 to 6a0b974 Compare April 23, 2026 16:58
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 23, 2026

Upstream branch: 507bd4b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081786
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081786=>linus-master branch from b1a7eac to 7f70317 Compare April 23, 2026 17:04
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 6a0b974 to 59ca59b Compare April 24, 2026 00:56
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 24, 2026

Upstream branch: dd6c438
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081786
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081786=>linus-master branch from 7f70317 to 067ff26 Compare April 24, 2026 01:02
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch 2 times, most recently from 94f0438 to 857ada9 Compare April 24, 2026 07:54
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 24, 2026

Upstream branch: dd6c438
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081786
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081786=>linus-master branch from 067ff26 to 05acdaf Compare April 24, 2026 07:57
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 857ada9 to 482ce5b Compare April 29, 2026 02:21
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 29, 2026

Upstream branch: dca922e
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081786
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081786=>linus-master branch from 05acdaf to ce07672 Compare April 29, 2026 02:31
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 482ce5b to 5a9f7c7 Compare April 30, 2026 07:29
Previously after the host sends a REPLACETLSPSK we freed the TLS keys as
part of calling nvmet_auth_sq_free() on success. A recent change ensured
we don't free the keys, allowing REPLACETLSPSK to work.

But that fix results in a kernel memory leak when running

```
nvme_trtype=loop ./check nvme/041 nvme/042 nvme/043 nvme/044 nvme/045 nvme/051 nvme/052
echo scan > /sys/kernel/debug/kmemleak
cat /sys/kernel/debug/kmemleak
```

We can't free the keys on a successful DHCHAP operation, otherwise the
next REPLACETLSPSK will fail, so instead let's free them before we
replace them as part of nvmet_auth_challenge().

This ensures that REPLACETLSPSK works, while also avoiding any memory
leaks.

Fixes: 2e6eb6b ("nvmet-tcp: Don't free SQ on authentication success")
Signed-off-by: Alistair Francis <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 30, 2026

Upstream branch: e75a43c
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081786
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081786=>linus-master branch from ce07672 to b0eafac Compare April 30, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant