Bug 16099

Summary: crond crashes with segfault if a @reboot command is used in the config file
Product: Busybox Reporter: t.prueckl
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description t.prueckl 2024-06-05 12:03:09 UTC
The issue occurs if ENABLE_FEATURE_CROND_D is NOT set.

In that case PARSE_KEEP_COPY is set to 0. Which results in parser->data being a nullptr.

Stacktrace
#0  skip_whitespace (s=0x0) at libbb/skip_whitespace.c:19
#1  0x0000aaaaafef12f8 in load_crontab () at miscutils/crond.c:517
#2  0x0000aaaaafef1588 in rescan_crontab_dir () at miscutils/crond.c:634
#3  0x0000aaaaafef1880 in crond_main () at miscutils/crond.c:1056
#4  0x0000aaaaafee3130 in run_applet_no_and_exit () at libbb/appletlib.c:967
#5  0x0000aaaaafee34c0 in run_applet_and_exit () at libbb/appletlib.c:986
#6  0x0000aaaaafee3550 in main (argc=<optimized out>, argv=0xffffcb7f5668) at libbb/appletlib.c:1126