Commit 4c755b3
netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path
commit 0d459e2 upstream.
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: [email protected]
Fixes: 7203443 ("netfilter: nf_tables: GC transaction race with abort path")
Reported-by: Kuan-Ting Chen <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Signed-off-by: Feng Zhou <[email protected]>1 parent 50975e1 commit 4c755b3
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9875 | 9875 | | |
9876 | 9876 | | |
9877 | 9877 | | |
9878 | | - | |
9879 | | - | |
9880 | | - | |
9881 | | - | |
9882 | | - | |
9883 | 9878 | | |
9884 | 9879 | | |
9885 | 9880 | | |
| |||
9896 | 9891 | | |
9897 | 9892 | | |
9898 | 9893 | | |
| 9894 | + | |
| 9895 | + | |
| 9896 | + | |
| 9897 | + | |
| 9898 | + | |
| 9899 | + | |
| 9900 | + | |
| 9901 | + | |
9899 | 9902 | | |
9900 | 9903 | | |
9901 | 9904 | | |
| |||
0 commit comments