aboutsummaryrefslogtreecommitdiff
path: root/llvm/include/llvm/DebugInfo/DWARF/(public-mirror)
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2024-06-25 20:31:50 +0000
committerKyle Evans <kevans@FreeBSD.org>2024-06-25 20:32:08 +0000
commit3da568710fde08251996c117b87bedb326dedb57 (patch)
treee2016a45d7b0c91048a55d0dfd42a6e4f5fecca7 /llvm/include/llvm/DebugInfo/DWARF/(public-mirror)
parent7d6932d20aedbbb220cd78e90ab4e82d1abaad31 (diff)
downloadsrc-main.tar.gz
src-main.zip
stand: module: unlink the entire tail when dependencies fail to loadHEADmain
Assume you have loader configured to load linux64, which has a dependency on both linux_common and mqueuefs but neither the kernel nor kernel config in question have the mqueuefs module included. When the load command for linux64 fails to find mqueuefs, it will free both linux64 and linux_common as they were loaded first, but only linux64 gets removed from the module list. As a result, future traversals hit an easy use-after-free with linux_common. Fix it so that we unlink the entire tail of the list. Anything after the initially loaded module is, by definition, a dependency on the loaded module while we're still in the load command, so we can just discard the entire tail. If linux_common were loaded before linux64, it should not move to a position during this load where it would suddenly be missing from the view presented to the kernel. Reported by: philip Reviewed by: imp, philip, tsoome MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45731
Diffstat (limited to 'llvm/include/llvm/DebugInfo/DWARF/(public-mirror)')
0 files changed, 0 insertions, 0 deletions