RTEMS | cpukit/shell Fix NULL Pointer Dereference in Shell Memory Dump Commands (!508)
lei huang (@leihuang)
gitlab at rtems.org
Fri Jun 13 06:19:05 UTC 2025
lei huang created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/508
Project:Branches: leihuang/rtems:leihuang-main-patch-50573 to rtems/rtos/rtems:main
Author: lei huang
### Problem Description
The shell memory dump commands (`mdump`, `wdump`, `ldump`) in `cpukit/libmisc/shell/main_mdump.c` have a bug when invoked without arguments.
**Root Cause:**
When these commands are called without providing a memory address argument (e.g., just typing `wdump`), the `args_parse()` function sets the address pointer to `NULL`. Subsequently, `rtems_mdump()` attempts to dereference this NULL pointer, leading to undefined behavior and potential system crash.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/508
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250613/f1fac8f8/attachment-0001.htm>
More information about the bugs
mailing list