time/namespace: Validate nanosecond field in proc_timens_set_offset()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 04a8682a71becdb639ec9c0d82b315a2baef7a5d · < 06aba58e58492d2b8eae059274caed29025ea96e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
time/namespace: Validate nanosecond field in proc_timens_set_offset()
The function validates tv_sec to be within [-KTIME_SEC_MAX, KTIME_SEC_MAX] but never validates that tv_nsec is within the valid range of [0, NSEC_PER_SEC-1] before using it in timespec64_add().
timespec64_add() expects both timespec64 structures to have normalized values with tv_nsec in the range [0, 999999999]. If off->val.tv_nsec contains invalid values (negative or >= NSEC_PER_SEC), it could lead to incorrect calculations or unexpected behavior.
Add validation to ensure tv_nsec is within the valid range before performing the addition.
From the CVE record · Linux
The Linux kernel does not validate the nanosecond field before adding a time namespace offset. An invalid value can cause incorrect calculations or unexpected behavior. The input does not specify how an attacker could supply the value or whether authentication or user interaction is required.
Anyone running the Linux kernel should check whether their version is affected; affected versions are not specified.