[RTEMS Project] #4629: shell: Potential stack corruption in rtems_shell_init()

RTEMS trac trac at rtems.org
Fri Mar 18 07:06:49 UTC 2022


#4629: shell: Potential stack corruption in rtems_shell_init()
-----------------------------+------------------------------
 Reporter:  Sebastian Huber  |       Owner:  Sebastian Huber
     Type:  defect           |      Status:  closed
 Priority:  normal           |   Milestone:  6.1
Component:  shell            |     Version:
 Severity:  normal           |  Resolution:  fixed
 Keywords:                   |  Blocked By:
 Blocking:                   |
-----------------------------+------------------------------
Changes (by Sebastian Huber <sebastian.huber@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"b837c8386954b2aff5ee563ffec4383cb4052a43/rtems"
 b837c83/rtems]:
 {{{
 #!CommitTicketReference repository="rtems"
 revision="b837c8386954b2aff5ee563ffec4383cb4052a43"
 shell: Avoid potential stack corruption

 The rtems_shell_init() passed the address of a stack variable
 (exit_code) to rtems_shell_run().  If wait == false, then the stack
 variable goes out of scope but may be accessed by the created shell
 thread.

 The rtems_shell_script() was affected by the same problem.

 Close #4629.
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4629#comment:2>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list