netfilter: nf_tables: Fix potential data-race in __nft_flowtable_type_get()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3b49e2e94e6ebb8b23d0955d9e898254455734f8 · < 8b891153b2e4dc0ca9d9dab8f619d49c740813df| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_tables: Fix potential data-race in __nft_flowtable_type_get()
nft_unregister_flowtable_type() within nf_flow_inet_module_exit() can concurrent with __nft_flowtable_type_get() within nf_tables_newflowtable(). And thhere is not any protection when iterate over nf_tables_flowtables list in __nft_flowtable_type_get(). Therefore, there is pertential data-race of nf_tables_flowtables list entry.
Use list_for_each_entry_rcu() to iterate over nf_tables_flowtables list in __nft_flowtable_type_get(), and use rcu_read_lock() in the caller nft_flowtable_type_get() to protect the entire type query process.
From the CVE record · Linux
The Linux kernel’s nf_tables flowtable type lookup can race with flowtable type unregistration because it iterates a list without protection. This requires the two operations to occur concurrently; the input does not specify what an attacker could achieve or whether access or user interaction is needed.
Teams running Linux kernels with the affected nf_tables flowtable code should check their kernel versions; affected versions were not provided.