Repository navigation
Closed
Description
Backtrace
[ 00 ] libpthread-2.17.so waitpid
[ 01 ] traffic_server crash_logger_invoke(int, siginfo_t*, void*) ( Crash.cc:168 )
[ 02 ] libpthread-2.17.so
[ 03 ] traffic_server Vol::force_evacuate_head(Dir*, int) ( P_CacheVol.h:461 )
[ 04 ] traffic_server CacheVC::openReadClose(int, Event*) ( CacheRead.cc:542 )
[ 05 ] traffic_server CacheVC::calluser(int) ( P_CacheInternal.h:705 )
[ 06 ] traffic_server CacheVC::openReadMain(int, Event*) ( CacheRead.cc )
[ 07 ] traffic_server CacheVC::openReadReadDone(int, Event*) ( CacheRead.cc:639 )
[ 08 ] traffic_server CacheVC::handleReadDone(int, Event*) ( eventsystem/I_Continuation.h:219 )
[ 09 ] traffic_server CacheVC::openReadMain(int, Event*) ( eventsystem/I_Continuation.h:219 )
[ 10 ] traffic_server EThread::process_event(Event*, int) ( I_Continuation.h:219 )
[ 11 ] traffic_server EThread::process_queue(Queue<Event, Event::Link_link>*, int*, int*) ( UnixEThread.cc:162 )
[ 12 ] traffic_server EThread::execute_regular() ( UnixEThread.cc:222 )
[ 13 ] traffic_server EThread::execute() ( UnixEThread.cc:327 )
[ 14 ] traffic_server spawn_thread_internal(void*) [clone .llvm.4297563414356737819] ( Thread.cc:92 )
[ 15 ] libpthread-2.17.so start_thread
Affected Versions
We faced this crash with 8.0.x, 8.1.x, and 9.0.x intermittently.
Activity
cmcfarlen commentedon Mar 7, 2022
Looking at the core file:
The local variable b holds an invalid pointer so this crashes when dereferencing b on line 161.
line 459 assumes dir_evac_bucket returns a valid index into p->evacuate. This update adds a bounds check around this.
Further analysis on this scenario:
The Dir type is an array of 5 uint16_t. Plugging these values into a unit test and calling the dir_evac_bucket macro yields 12526 which is outside of the bounds of p->evacuate_size.