You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I test the RTthread with our fuzzing tool, we encounter several crashes in kernel.
Step to reproduce
To reproduce, modify the rtthread/rt-thread/bsp/qemu-vexpress-a9.
run scons . and run with qemu-nographic.sh for each crash at a time can observe the crash.
My guess is there might be a illegal memory access in return l->next == l;, but I failed to analyze the actual case here.
crash 3:
The program crashed at thread = rt_thread_self();, but I failed to debug deeper, as it directly crashed at rt_thread_self.
void*rt_mp_alloc(rt_mp_tmp, rt_int32_ttime)
{
rt_uint8_t*block_ptr;
rt_base_tlevel;
structrt_thread*thread;
rt_uint32_tbefore_sleep=0;
/* parameter check */RT_ASSERT(mp!=RT_NULL);
/* get current thread */thread=rt_thread_self();
crash 4:
The program crashed at type = (enum rt_object_class_type)(type & ~RT_Object_Class_Static);, similar to crash 1, where it seems to fail to check the vadaility of a certain value and trigger this error.
structrt_object_information*rt_object_get_information(enumrt_object_class_typetype)
{
intindex;
type= (enumrt_object_class_type)(type& ~RT_Object_Class_Static);
for (index=0; index<RT_Object_Info_Unknown; index++)
if (_object_container[index].type==type) return&_object_container[index];
returnRT_NULL;
}
crash 5:
It ends up in _heap_lock, where seems rt_spin_lock_irqsave triggers an illegal memory access.
It crashed at rt_event_send, where seems failed to check the validity of event.
longsyz_event_send(volatileintevent, volatileintset) {
rt_err_tresult=rt_event_send((rt_event_t)event, (rt_uint32_t)set);
if (result!=RT_EOK) {
//rt_kprintf("Failed to send event: %d\n", result);return-1;
}
return0;
}
It would be so nice of you to review this bug report. Thank you again for taking the time. Any suggestions or feedback you can provide would be very helpful.
Best regards,
Other additional context
No response
The text was updated successfully, but these errors were encountered:
RT-Thread Version
2f55990
Hardware Type/Architectures
QEMU/arm32
Develop Toolchain
GCC
Describe the bug
Hi, when I test the RTthread with our fuzzing tool, we encounter several crashes in kernel.
Step to reproduce
To reproduce, modify the
rtthread/rt-thread/bsp/qemu-vexpress-a9
.run
scons .
and run withqemu-nographic.sh
for each crash at a time can observe the crash.The following are the reproducer program
System Logs:
crash 1:
it end up in
where failed to check the validity of
object->type & ~RT_Object_Class_Static;
cause the crash.crash 2:
It ends up in
My guess is there might be a illegal memory access in
return l->next == l;
, but I failed to analyze the actual case here.crash 3:
The program crashed at
thread = rt_thread_self();
, but I failed to debug deeper, as it directly crashed atrt_thread_self
.crash 4:
The program crashed at
type = (enum rt_object_class_type)(type & ~RT_Object_Class_Static);
, similar to crash 1, where it seems to fail to check the vadaility of a certain value and trigger this error.crash 5:
It ends up in _heap_lock, where seems
rt_spin_lock_irqsave
triggers an illegal memory access.crash 6:
It crashed at
rt_event_send
, where seems failed to check the validity ofevent
.It would be so nice of you to review this bug report. Thank you again for taking the time. Any suggestions or feedback you can provide would be very helpful.
Best regards,
Other additional context
No response
The text was updated successfully, but these errors were encountered: