smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().
smc_clc_prfx_match() is called from smc_listen_work() and not under RCU nor RTNL.
Using sk_dst_get(sk)->dev could trigger UAF.
Let's use __sk_dst_get() and dst_dev_rcu().
Note that the returned value of smc_clc_prfx_match() is not used in the caller.
From the CVE record · Linux
The Linux kernel's smc_clc_prfx_match() can trigger a use-after-free when it accesses a destination device during SMC listen work without RCU or RTNL protection. The input does not specify how an attacker could trigger this, whether authentication or user interaction is required, or what an attacker could achieve.
Engineers running the Linux kernel should check their versions against the vendor advisory; affected versions are not specified.