diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-03-28 14:23:55 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-04-04 11:34:42 +0200 |
commit | 0d459e2ffb541841714839e8228b845458ed3b27 (patch) | |
tree | f8e8e2753b4d585c6db4d0a1603fe97f1fa11ae0 /net/unix/sysctl_net_unix.c | |
parent | a45e6889575c2067d3c0212b6bc1022891e65b91 (diff) |
netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path
The commit mutex should not be released during the critical section
between nft_gc_seq_begin() and nft_gc_seq_end(), otherwise, async GC
worker could collect expired objects and get the released commit lock
within the same GC sequence.
nf_tables_module_autoload() temporarily releases the mutex to load
module dependencies, then it goes back to replay the transaction again.
Move it at the end of the abort phase after nft_gc_seq_end() is called.
Cc: stable@vger.kernel.org
Fixes: 720344340fb9 ("netfilter: nf_tables: GC transaction race with abort path")
Reported-by: Kuan-Ting Chen <hexrabbit@devco.re>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions