diff options
| author | Suren Baghdasaryan <[email protected]> | 2024-03-21 16:36:34 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-04-26 03:55:52 +0000 |
| commit | 47a92dfbe01f41bcbf359250ccb3caa589763abf (patch) | |
| tree | d3cdcd4c122fe4b86e195fcaca5312218e725352 /lib/alloc_tag.c | |
| parent | lib: code tagging module support (diff) | |
| download | kernel-47a92dfbe01f41bcbf359250ccb3caa589763abf.tar.gz kernel-47a92dfbe01f41bcbf359250ccb3caa589763abf.zip | |
lib: prevent module unloading if memory is not freed
Skip freeing module's data section if there are non-zero allocation tags
because otherwise, once these allocations are freed, the access to their
code tag would cause UAF.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Suren Baghdasaryan <[email protected]>
Tested-by: Kees Cook <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Alex Gaynor <[email protected]>
Cc: Alice Ryhl <[email protected]>
Cc: Andreas Hindborg <[email protected]>
Cc: Benno Lossin <[email protected]>
Cc: "Björn Roy Baron" <[email protected]>
Cc: Boqun Feng <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Dennis Zhou <[email protected]>
Cc: Gary Guo <[email protected]>
Cc: Kent Overstreet <[email protected]>
Cc: Miguel Ojeda <[email protected]>
Cc: Pasha Tatashin <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Wedson Almeida Filho <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/alloc_tag.c')
0 files changed, 0 insertions, 0 deletions
