mptcp: sysctl: blackhole timeout: avoid using current->nsproxy
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mptcp: sysctl: blackhole timeout: avoid using current->nsproxy
As mentioned in the previous commit, using the 'net' structure via 'current' is not recommended for different reasons:
- Inconsistency: getting info from the reader's/writer's netns vs only from the opener's netns.
- current->nsproxy can be NULL in some cases, resulting in an 'Oops' (null-ptr-deref), e.g. when the current task is exiting, as spotted by syzbot [1] using acct(2).
The 'pernet' structure can be obtained from the table->data using container_of().
From the CVE record · Linux
The Linux kernel's MPTCP blackhole timeout sysctl can dereference a null pointer when it accesses the current task's network namespace and that task is exiting. This can cause a kernel Oops; the reported case involved a local task using acct(2).
Teams running Linux kernels with the affected MPTCP sysctl code should check their kernel versions against the vendor advisory; affected versions were not provided.