Bug 16099 - crond crashes with segfault if a @reboot command is used in the config file
Summary: crond crashes with segfault if a @reboot command is used in the config file
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-05 12:03 UTC by t.prueckl
Modified: 2024-06-05 12:03 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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