hritikkumar07 commented on issue #20011: URL: https://github.com/apache/nuttx/issues/20011#issuecomment-5514221978
I’d like to work on this issue. From what I understand, the problem is that `vsnprintf()` returns the length of the complete formatted string even when the output gets truncated to `info->line`. `mount_sprintf()` then passes that value directly to `procfs_memcpy()`, which can make it read past the end of the 64-byte staging buffer. To Fix this, i'll start by: 1. Inspect `mount_sprintf()` and the related `procfs_memcpy()` usage. 2. Make sure the length passed to `procfs_memcpy()` is limited to the number of bytes actually stored in `info->line`. 3. Add a regression test using a mountpoint long enough to trigger the truncation. 4. Build and run the relevant NuttX tests to make sure the change doesn't affect normal `/proc/fs/mount` output. I’ll start by reproducing the issue locally and then prepare a small focused patch. -- 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]
