Commit 3844585
committed
netfilter: nf_tables: release batch on table validation from abort path
jira VULN-4969
subsystem-sync netfilter:nf_tables 4.18.0-553.16.1
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit a45e688
Unlike early commit path stage which triggers a call to abort, an
explicit release of the batch is required on abort, otherwise mutex is
released and commit_list remains in place.
Add WARN_ON_ONCE to ensure commit_list is empty from the abort path
before releasing the mutex.
After this patch, commit_list is always assumed to be empty before
grabbing the mutex, therefore
03c1f1e ("netfilter: Cleanup nft_net->module_list from nf_tables_exit_net()")
only needs to release the pending modules for registration.
Cc: stable@vger.kernel.org
Fixes: c0391b6 ("netfilter: nf_tables: missing validation from the abort path")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit a45e688)
Signed-off-by: Greg Rose <g.v.rose@ciq.com>1 parent d584ffe commit 3844585
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8465 | 8465 | | |
8466 | 8466 | | |
8467 | 8467 | | |
| 8468 | + | |
8468 | 8469 | | |
8469 | 8470 | | |
8470 | 8471 | | |
8471 | | - | |
| 8472 | + | |
8472 | 8473 | | |
8473 | 8474 | | |
8474 | 8475 | | |
| |||
8617 | 8618 | | |
8618 | 8619 | | |
8619 | 8620 | | |
8620 | | - | |
| 8621 | + | |
8621 | 8622 | | |
8622 | 8623 | | |
8623 | 8624 | | |
| |||
8636 | 8637 | | |
8637 | 8638 | | |
8638 | 8639 | | |
| 8640 | + | |
| 8641 | + | |
8639 | 8642 | | |
8640 | 8643 | | |
8641 | 8644 | | |
| |||
9287 | 9290 | | |
9288 | 9291 | | |
9289 | 9292 | | |
9290 | | - | |
9291 | | - | |
9292 | | - | |
| 9293 | + | |
| 9294 | + | |
| 9295 | + | |
| 9296 | + | |
9293 | 9297 | | |
9294 | 9298 | | |
9295 | 9299 | | |
| |||
0 commit comments