Overview
Original source datacron/entry.c in vixie cron before 9cc8ab1, as used in OpenBSD 7.4 and 7.5, allows a heap-based buffer underflow and memory corruption. NOTE: this issue was introduced during a May 2023 refactoring.
Affected products and scope
vixie cron: versions before9cc8ab1are identified as affected. Commit9cc8ab1is the upstream fix point; the evidence does not map that commit to a specific packaged release.OpenBSD 7.4: identified as affected.OpenBSD 7.5: identified as affected.- The advisory limits the described heap underflow condition to 64-bit builds and states that 32-bit builds do not reach the same underflow path. The status of other OpenBSD branches or vixie cron packages is not established by the available evidence.
Technical details
The flaw is in cron/entry.c, in range and step handling introduced during a May 2023 refactoring. The set_range() function uses an attacker-controlled step value in a loop and passes the resulting index to bit_set(). A very large numeric value can be interpreted as a negative integer by atoi() on 64-bit builds, causing the index to move before the heap-allocated bits region and produce an out-of-bounds write and memory corruption. The advisory states that the condition affects both the cron daemon and the crontab command, while 32-bit builds do not reach the same underflow path. The supplied record assessment describes network reachability with no required privileges or user interaction, but the advisory does not identify a specific network protocol or service path. The practical remote entry path and the reliability of turning the memory corruption into code execution therefore remain deployment-dependent.
Exploitability
- The public advisory contains a proof of concept and exploitation analysis for OpenBSD, and the supplied record marks public exploit material as available.
- The record assessment describes network reachability, low complexity, no required authentication or privileges, and no user interaction. The technical examples, however, focus on processing data through
crontaband the cron daemon rather than naming a specific network protocol. - The advisory states that obtaining root is possible, but describes the issue as potentially exploitable and dependent on heap layout, ASLR, and process conditions. The available evidence does not establish a reliable end-to-end remote exploit or exploitation in the wild.
Technical impact
Memory corruption occurs when an abnormal step causes bit_set() to index before the heap-allocated bit string. The direct result may be a process crash or corruption of nearby heap data; the advisory also describes a memory-write primitive. With a suitable heap layout, the corruption may alter structures used by cron to execute commands and may enable privilege escalation to root. The available evidence limits the demonstrated impact to the affected host and processes; it does not establish automatic spread to other hosts. The final outcome depends on architecture, heap layout, ASLR, and exploit reliability.
Business impact
cronmay crash or process schedule data incorrectly, disrupting recurring jobs; the advisory notes that OpenBSD does not automatically restart the daemon after a crash.- If the memory corruption is successfully controlled, an attacker may alter process state and potentially obtain root, affecting scheduled jobs, local configuration, and local data.
- The issue affects both the
crontabprocessing path and the cron daemon, so updating only one component without checking the other may leave exposure. - The evidence does not show that every trigger results in privilege escalation; reliability depends on architecture, heap layout, and host conditions.
Remediation
- Upgrade or rebuild vixie cron from source that includes commit
9cc8ab1. The fix rejects negative results fromatoi()inget_number()and handlesstep <= 1orstep > stopinset_range()before operating on the bit string. - For affected OpenBSD deployments, install an OpenBSD update containing the corresponding fix or rebuild the cron component from corrected source. The evidence does not identify an exact fixed OpenBSD release, so do not assume that every later release or parallel branch is covered.
- If an update is not immediately possible, restrict untrusted writes or inputs to crontab and cron database data and assess temporary reduction of exposure for the affected processing paths. This is risk reduction, not a substitute for the fix.
- After deployment, verify the actual binary or source tree contains the relevant checks and review package overlays, backports, and internal builds. No separate mitigation equivalent to the code fix was confirmed by an authoritative source.
Detection
- Inventory OpenBSD systems and vixie cron builds, recording the package revision or source commit included in each deployment.
- Determine whether the
cronandcrontabbinaries are 64-bit; the advisory limits the described underflow condition to 64-bit builds. - Inspect the corresponding source or binary to confirm that
get_number()rejects negative parsed values and thatset_range()safely handlesstepvalues less than one or greater thanstop. - Review crontab files and other schedule inputs for malformed range or step expressions, especially unusually large values. This is a precautionary heuristic, not a confirmed IOC.
- Review existing telemetry for
cronorcrontabcrashes and failures to restart, along with unexpected changes to scheduled jobs. Absence of these events does not prove that a system is safe.