NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/58914: timerfd_settime(2) is missing itimespecfix
>Number: 58914
>Category: kern
>Synopsis: timerfd_settime(2) is missing itimespecfix
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 18 06:15:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10
>Organization:
The FixBSD Timerfoundation
>Environment:
>Description:
1. The path from the timerfd_settime(2) syscall to the kernel subroutine itimer_settime(9) is missing an itimespecfix.
2. The kernel subroutine itimer_settime(9) is missing assertions of the invariants implied by itimespecfix.
Both timer_settime(2) and setitimer(2) sanitize their inputs appropriately, with itimespecfix and itimerfix respectively, but timerfd_settime(2) is missing that.
>How-To-Repeat:
run the python3.13.1 test suite
>Fix:
1. Call itimespecfix in do_timerfd_settime just like in dotimer_settime.
2. Add KASSERT(it->it_time.it_interval.tv_sec >= 0), KASSERT(it->it_time.it_interval.tv_nsec >= 0), KASSERT(it->it_time.it_interval.tv_nsec < 1000000000) to itimer_settime.
3. Do all of this last week so it goes out in the 10.1 release we already tagged...
Home |
Main Index |
Thread Index |
Old Index