summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorMalaya Kumar Rout <malayarout91@gmail.com>2026-07-04 15:04:28 +0530
committerThomas Gleixner <tglx@kernel.org>2026-07-07 23:26:58 +0200
commit06aba58e58492d2b8eae059274caed29025ea96e (patch)
tree24067f6a0f77de0cbe704788e5ab961a307cdc73 /tools/perf/scripts/python/syscall-counts.py
parenteddfded4196542deda7cb2da3d7ebef83f7ccfa4 (diff)
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. Fixes: 04a8682a71be ("fs/proc: Introduce /proc/pid/timens_offsets") Signed-off-by: Malaya Kumar Rout <malayarout91@gmail.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260704093429.89350-1-malayarout91@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions