net: stmmac: initialize ptp_lock at probe time
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.15.222, 6.1.189, 6.6.158, 6.12.111, 6.18.53, and 1 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: net: stmmac: initialize ptp_lock at probe time priv->ptp_lock is only initialized in stmmac_ptp_register(), which runs during __stmmac_open(). However, the lock is also used while the interface is down and has never been opened: tc_taprio_configure() invokes the PTP gettime64() callback to compute the EST base time when offloading a TAPRIO schedule, and stmmac_get_time() takes priv->ptp_lock. Using an uninitialized rwlock is undefined behaviour. Move the rwlock_init() to __stmmac_dvr_probe(), together with the other private locks, so that ptp_lock is always valid regardless of the interface state.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From b60189e0392fa06348911077ef281eb2b1047b6a · fixed in ee33e424d4932c70f103b94a46b685923f236f65; From b60189e0392fa06348911077ef281eb2b1047b6a · fixed in 7ced87834f3a58761d4bbcabf8326478548e6a54; From b60189e0392fa06348911077ef281eb2b1047b6a · fixed in 79fb5bcc50996964e076dffbdc24b7d2c06bd957; From b60189e0392fa06348911077ef281eb2b1047b6a · fixed in 420315413b29635de1d4ea4142e410e6465260f3; From b60189e0392fa06348911077ef281eb2b1047b6a · fixed in 25cc0096efba83b4e0e6fa50f03e9543b41e9d3d; From b60189e0392fa06348911077ef281eb2b1047b6a · fixed in b1986595cf827c38ff929e22fbc9ca8f76379306; From b60189e0392fa06348911077ef281eb2b1047b6a · fixed in 0338c68e22abd2ee509ec2e32508a50896618c32
- Linux Linux
5.6
- KernelLinux
From 5.6.0 · fixed in 5.15.222; From 5.16.0 · fixed in 6.1.189; From 6.2.0 · fixed in 6.6.158; From 6.7.0 · fixed in 6.12.111; From 6.13.0 · fixed in 6.18.53; From 6.19.0 · fixed in 7.2.7
References 7
git.kernel.org
- stable/c/ee33e424d4932c70f103b94a46b685923f236f65
- stable/c/7ced87834f3a58761d4bbcabf8326478548e6a54
- stable/c/79fb5bcc50996964e076dffbdc24b7d2c06bd957
- stable/c/420315413b29635de1d4ea4142e410e6465260f3
- stable/c/25cc0096efba83b4e0e6fa50f03e9543b41e9d3d
- stable/c/b1986595cf827c38ff929e22fbc9ca8f76379306
- stable/c/0338c68e22abd2ee509ec2e32508a50896618c32