RTEMS | libio needs to check the path length of any component is less than NAME_MAX (#5257)
Prashant Rahul (@prashantrahul141)
gitlab at rtems.org
Mon Feb 23 05:44:33 UTC 2026
Prashant Rahul commented: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5257#note_143285
If my understanding of RTEMS filesystem is correct. [/cpukit/libcsupport/src/_rename_r.c](https://gitlab.rtems.org/rtems/rtos/rtems/-/blob/main/cpukit/libcsupport/src/_rename_r.c) is where we call the `rename_h` handler from operations table. And it is here that we also call internal path evaluator. So I am assuming this is where we need to verify indiviual path component length before continuing execution as normal or return `ENAMETOOLONG` if verification fails.
Also, where exactly is `rename` defined? The file i mentioned defines `_rename_r` but not `rename`. And other similiar files, such as `open.c`, `chmod.c` which uses rtems filesystem does define their respective functions as `open`, `chmod`. I haven't been able to find the definition of `rename` with greping.
Is my understanding correct? or am i missing something?
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5257#note_143285
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/20260223/5b8cb29a/attachment.htm>
More information about the bugs
mailing list