Abhishekmishra2808 opened a new pull request, #18914: URL: https://github.com/apache/nuttx/pull/18914
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary Add caller validation for pseudoFS chmod and chown operations in inode_chstat(). This change validates the caller using the task's effective uid and aligns pseudoFS permission behavior with POSIX-style semantics by allowing owner/root chmod operations while restricting chown to root-only. ## Impact Prevents unprivileged tasks from modifying pseudoFS inode ownership or mode bits for arbitrary files. The change affects only pseudoFS inode attribute updates through inode_chstat() and does not modify mountpoint filesystem behavior. ## Testing Validated using a dedicated permission test application on NuttX sim and compared against equivalent Linux behavior . Tested scenarios include root chmod, owner chmod, non-owner chmod denial, root chown, non-root chown denial, ownership propagation, and verification of -EPERM for denied operations. <img width="833" height="475" alt="image" src="https://github.com/user-attachments/assets/e62f8fc7-49b7-43e8-a09e-0add221cc52e" /> ostest and checkpatch tests all passed -- 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]
