net: ena: PHC: Check return code before setting timestamp output
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 |
|
|
6.18.337.0.107.1In the Linux kernel, the following vulnerability has been resolved:
net: ena: PHC: Check return code before setting timestamp output
ena_phc_gettimex64() is setting the output parameter regardless of whether ena_com_phc_get_timestamp() succeeded or failed.
When ena_com_phc_get_timestamp() returns an error, the timestamp parameter may contain uninitialized stack memory (e.g., when PHC is disabled or in blocked state) or invalid hardware values. Passing these to userspace via the PTP ioctl is both a security issue (information leak) and a correctness bug.
Fix by checking the return code after releasing the lock and only setting the output timestamp on success.
From the CVE record · Linux
The Linux kernel’s ENA PHC driver can return an uninitialized or invalid timestamp through the PTP ioctl when timestamp retrieval fails, such as when PHC is disabled or blocked. A local user able to invoke that ioctl may receive stack memory; the input does not specify authentication requirements beyond ioctl access.
Engineers running Linux systems that use the ENA PHC driver should check their kernel; affected versions are not specified.