[Nagios-devel] SIGSEGV by 136 Character Output with Backslash at
Posted: Wed Aug 13, 2008 1:33 am
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
i have a problem with all cgis (status, tac etc.).
all scripts receive a SIGSEGV, if one plugin_output 136 character long and with a backslash at the end.
# Lines form status.dat
servicestatus {
~ host_name=server
~ service_description=Disk
~ modified_attributes=0
~ check_command=check_disk!20%!10%
~ check_period=24x7
~ notification_period=24x7
~ check_interval=5.000000
~ retry_interval=1.000000
~ event_handler=
~ has_been_checked=1
~ should_be_scheduled=1
~ check_execution_time=0.058
~ check_latency=0.671
~ check_type=0
~ current_state=0
~ last_hard_state=0
~ last_event_id=0
~ current_event_id=0
~ current_problem_id=0
~ last_problem_id=0
~ current_attempt=1
~ max_attempts=3
~ current_event_id=0
~ last_event_id=0
~ state_type=1
~ last_state_change=1218617252
~ last_hard_state_change=1218617252
~ last_time_ok=1218617252
~ last_time_warning=0
~ last_time_unknown=0
~ last_time_critical=0
~ plugin_output=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\
~ long_plugin_output=
~ performance_data=
~ last_check=1218617252
~ next_check=1218617552
~ check_options=0
~ current_notification_number=0
~ current_notification_id=0
~ last_notification=0
~ next_notification=0
~ no_more_notifications=0
~ notifications_enabled=1
~ active_checks_enabled=1
~ passive_checks_enabled=1
~ event_handler_enabled=1
~ problem_has_been_acknowledged=0
~ acknowledgement_type=0
~ flap_detection_enabled=1
~ failure_prediction_enabled=1
~ process_performance_data=1
~ obsess_over_service=1
~ last_update=1218617339
~ is_flapping=0
~ percent_state_change=0.00
~ scheduled_downtime_depth=0
~ }
#Strace with one space or tab (default-status.dat):
...
open("/status.dat", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0664, st_size=4613708, ...}) = 0
mmap(NULL, 4613708, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b3417812000
brk(0xa58000) = 0xa58000
brk(0xa79000) = 0xa79000
brk(0xa9a000) = 0xa9a000
brk(0xabb000) = 0xabb000
brk(0xadc000) = 0xadc000
munmap(0x2b3417812000, 4613708) = 0
close(3) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b3417812000
write(1, "Cache-Control: no-store\r\n", 25Cache-Control: no-store
) = 25
write(1, "Pragma: no-cache\r\n", 18Pragma: no-cache
) = 18
write(1, "Refresh: 90\r\n", 13Refresh: 90
) = 13
- --- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Strace with any space at the beginning of the line:
...
open("/status.dat", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0664, st_size=4613709, ...}) = 0
mmap(NULL, 4613709, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b8c17937000
brk(0xa58000) = 0xa58000
brk(0xa79000) = 0xa79000
brk(0xa9a000) = 0xa9a000
brk(0xabb000) = 0xabb000
brk(0xadc000) = 0xadc000
munmap(0x2b8c17937000, 4613709) = 0
close(3) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8c17937000
write(1, "Cache-Control: no-store\r\n", 25Cache-Control: no-store
) = 25
write(1, "Pragma: no-cache\r\n", 18Pragma: no-cache
) = 18
write(1, "Refresh: 90\r\n", 13Refresh: 90
) = 13
open("/dev/tty", O_RDWR|O_NONBLOCK|O_NOCTTY) = 3
writev(3, [
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Hash: SHA1
Hello,
i have a problem with all cgis (status, tac etc.).
all scripts receive a SIGSEGV, if one plugin_output 136 character long and with a backslash at the end.
# Lines form status.dat
servicestatus {
~ host_name=server
~ service_description=Disk
~ modified_attributes=0
~ check_command=check_disk!20%!10%
~ check_period=24x7
~ notification_period=24x7
~ check_interval=5.000000
~ retry_interval=1.000000
~ event_handler=
~ has_been_checked=1
~ should_be_scheduled=1
~ check_execution_time=0.058
~ check_latency=0.671
~ check_type=0
~ current_state=0
~ last_hard_state=0
~ last_event_id=0
~ current_event_id=0
~ current_problem_id=0
~ last_problem_id=0
~ current_attempt=1
~ max_attempts=3
~ current_event_id=0
~ last_event_id=0
~ state_type=1
~ last_state_change=1218617252
~ last_hard_state_change=1218617252
~ last_time_ok=1218617252
~ last_time_warning=0
~ last_time_unknown=0
~ last_time_critical=0
~ plugin_output=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\
~ long_plugin_output=
~ performance_data=
~ last_check=1218617252
~ next_check=1218617552
~ check_options=0
~ current_notification_number=0
~ current_notification_id=0
~ last_notification=0
~ next_notification=0
~ no_more_notifications=0
~ notifications_enabled=1
~ active_checks_enabled=1
~ passive_checks_enabled=1
~ event_handler_enabled=1
~ problem_has_been_acknowledged=0
~ acknowledgement_type=0
~ flap_detection_enabled=1
~ failure_prediction_enabled=1
~ process_performance_data=1
~ obsess_over_service=1
~ last_update=1218617339
~ is_flapping=0
~ percent_state_change=0.00
~ scheduled_downtime_depth=0
~ }
#Strace with one space or tab (default-status.dat):
...
open("/status.dat", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0664, st_size=4613708, ...}) = 0
mmap(NULL, 4613708, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b3417812000
brk(0xa58000) = 0xa58000
brk(0xa79000) = 0xa79000
brk(0xa9a000) = 0xa9a000
brk(0xabb000) = 0xabb000
brk(0xadc000) = 0xadc000
munmap(0x2b3417812000, 4613708) = 0
close(3) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b3417812000
write(1, "Cache-Control: no-store\r\n", 25Cache-Control: no-store
) = 25
write(1, "Pragma: no-cache\r\n", 18Pragma: no-cache
) = 18
write(1, "Refresh: 90\r\n", 13Refresh: 90
) = 13
- --- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Strace with any space at the beginning of the line:
...
open("/status.dat", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0664, st_size=4613709, ...}) = 0
mmap(NULL, 4613709, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b8c17937000
brk(0xa58000) = 0xa58000
brk(0xa79000) = 0xa79000
brk(0xa9a000) = 0xa9a000
brk(0xabb000) = 0xabb000
brk(0xadc000) = 0xadc000
munmap(0x2b8c17937000, 4613709) = 0
close(3) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8c17937000
write(1, "Cache-Control: no-store\r\n", 25Cache-Control: no-store
) = 25
write(1, "Pragma: no-cache\r\n", 18Pragma: no-cache
) = 18
write(1, "Refresh: 90\r\n", 13Refresh: 90
) = 13
open("/dev/tty", O_RDWR|O_NONBLOCK|O_NOCTTY) = 3
writev(3, [
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]