RTEMS | dosfs: Fix dangling fs_info pointer on initialization error (!1438)
Yang Zhang (@Chloe)
gitlab at rtems.org
Thu Aug 20 08:29:36 UTC 2026
Yang Zhang created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1438
Project:Branches: Chloe/rtems:fix-dosfs-dangling-fs-info to rtems/rtos/rtems:main
Author: Yang Zhang
## Summary
In msdos_initialize_support(), temp_mt_entry-\>fs_info was assigned the allocated fs_info structure before volume initialization. If subsequent steps failed (such as volume init, root directory open, or cluster buffer allocation), fs_info was freed, but temp_mt_entry-\>fs_info was left pointing to freed memory.
This created a dangling pointer in the mount table entry, which could lead to use-after-free or double-free errors during cleanup.
Fix this by delaying the assignment of temp_mt_entry-\>fs_info until all initialization steps have successfully completed.
## Generative AI
None
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1438
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-61nrb64160en9u11ki48wi819-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260820/94b7d49d/attachment-0001.htm>
More information about the bugs
mailing list