aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/clang-tools/gen_compile_commands.py
diff options
context:
space:
mode:
authorRichard Guy Briggs <[email protected]>2021-08-24 02:04:09 +0000
committerPaul Moore <[email protected]>2021-08-24 22:52:36 +0000
commit67d69e9d1a6c889d98951c1d74b19332ce0565af (patch)
tree9dc62b09fe7c96ec05736b532959b26959d07b75 /scripts/clang-tools/gen_compile_commands.py
parentaudit: add header protection to kernel/audit.h (diff)
downloadkernel-67d69e9d1a6c889d98951c1d74b19332ce0565af.tar.gz
kernel-67d69e9d1a6c889d98951c1d74b19332ce0565af.zip
audit: move put_tree() to avoid trim_trees refcount underflow and UAF
AUDIT_TRIM is expected to be idempotent, but multiple executions resulted in a refcount underflow and use-after-free. git bisect fingered commit fb041bb7c0a9 ("locking/refcount: Consolidate implementations of refcount_t") but this patch with its more thorough checking that wasn't in the x86 assembly code merely exposed a previously existing tree refcount imbalance in the case of tree trimming code that was refactored with prune_one() to remove a tree introduced in commit 8432c7006297 ("audit: Simplify locking around untag_chunk()") Move the put_tree() to cover only the prune_one() case. Passes audit-testsuite and 3 passes of "auditctl -t" with at least one directory watch. Cc: Jan Kara <[email protected]> Cc: Will Deacon <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Seiji Nishikawa <[email protected]> Cc: [email protected] Fixes: 8432c7006297 ("audit: Simplify locking around untag_chunk()") Signed-off-by: Richard Guy Briggs <[email protected]> Reviewed-by: Jan Kara <[email protected]> [PM: reformatted/cleaned-up the commit description] Signed-off-by: Paul Moore <[email protected]>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions