Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smackfs: Fix use-after-free in netlbl_catmap_walk()
Syzkaller reported use-after-free bug as described in [1]. The bug is triggered when smk_set_cipso() tries to free stale category bitmaps while there are concurrent reader(s) using the same bitmaps. Wait for RCU grace period to finish before freeing the category bitmaps in smk_set_cipso(). This makes sure that there are no more readers using the stale bitmaps and freeing them should be safe. [1] https://lore.kernel.org/netdev/[email protected]/ Reported-by: [email protected] Signed-off-by: Pawan Gupta <[email protected]> Signed-off-by: Casey Schaufler <[email protected]>
- Loading branch information