Skip to content

NAS-141230 / 27.0.0-BETA.1 / Fix use-after-free in NVDIMM pmem driver DMA#287

Merged
amotin merged 1 commit into
truenas/linux-6.18from
NAS-141230
Jun 5, 2026
Merged

NAS-141230 / 27.0.0-BETA.1 / Fix use-after-free in NVDIMM pmem driver DMA#287
amotin merged 1 commit into
truenas/linux-6.18from
NAS-141230

Conversation

@amotin

@amotin amotin commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

bio_for_each_bvec() accesses bio after the last loop iteration. There is a chance that due to context switching by that time the pmem_dma_callback() will already be called and the bio will be freed. To avoid that access break out of the loop explicitly.

bio_for_each_bvec() accesses bio after the last loop iteration.
There is a chance that due to context switching by that time the
pmem_dma_callback() will already be called and the bio will be
freed.  To avoid that access break out of the loop explicitly.
@bugclerk bugclerk changed the title Fix use-after-free in NVDIMM pmem driver DMA NAS-141230 / 27.0.0-BETA.1 / Fix use-after-free in NVDIMM pmem driver DMA Jun 4, 2026
@bugclerk

bugclerk commented Jun 4, 2026

Copy link
Copy Markdown

@ixhamza ixhamza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think this can be backported to truenas/linux-6.12 as well, since the NAS ticket has the hf_want label and the branch is now actively maintained.

@amotin amotin merged commit f1da345 into truenas/linux-6.18 Jun 5, 2026
6 checks passed
@amotin amotin deleted the NAS-141230 branch June 5, 2026 13:55
@bugclerk

bugclerk commented Jun 5, 2026

Copy link
Copy Markdown

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Jun 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants