aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2026-11-11 09:40:40 +0000
committerBrooks Davis <brooks@FreeBSD.org>2026-11-11 09:40:40 +0000
commit7f8c2056db1e39e44c3eda15aa4e53f7fc971cd8 (patch)
tree4274f93a276b3a68b205c5d7be4288b752f6e328 /include
parent2af08ab3f125ce5988a641c32c777afc52f917e1 (diff)
modstat: avoid copying from freed memory
If a module is unloaded after the module is looked up in kern_modstat, but before one of the copyout's occurs, then the memory being copied might be freed and reused leading to an information disclosure. The LLM was particularly concerned about a TOCTOU issue in the length of the name, but it seems likely that there are issues with all the copyout's. As such, hold the shared lock throughout. Reviewed by: markj Reported by: llm-postcr MFC after: 3 days Sponsored by: Innovate UK Fixes: 9b3851e9e3b1 ("- Lock down the ``module'' structure...") Differential Revision: https://reviews.freebsd.org/D61398
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions