hritikkumar07 opened a new pull request, #20049: URL: https://github.com/apache/nuttx/pull/20049
## Summary When formatting entries for `/proc/fs/mount`, `vsnprintf()` returns the full string length even if output is truncated to fit the 64-byte `info->line` staging buffer. `mount_sprintf()` was passing this untruncated length to `procfs_memcpy()`, causing an out-of-bounds read past `info->line` when a mountpoint path was long enough (e.g. >= 50 characters). This PR clamps `linesize` to `info->linelen - 1` before calling `procfs_memcpy()`, limiting the copy to the actual bytes stored in the buffer. Fixes #20011 ## Impact - **Is new feature needed?** No - **Impact on user?** Prevents procfs buffer overflow reads when long mount paths are present. - **Impact on build?** None - **Impact on hardware?** None ## Testing - Verified `mount_sprintf()` bounds logic when formatting long mount point paths (> 50 chars). - Confirmed output string truncation functions properly without reading past the end of `info->line`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
