Abhishekmishra2808 commented on code in PR #19122:
URL: https://github.com/apache/nuttx/pull/19122#discussion_r3406721429
##########
binfmt/binfmt_exec.c:
##########
@@ -101,6 +109,49 @@ static int exec_internal(FAR const char *filename,
}
#endif
+#ifdef CONFIG_SCHED_USER_IDENTITY
+ /* Verify that the calling task has execute permission on the
+ * file before attempting to load it. This enforces POSIX
+ * execute permission semantics at the binfmt layer.
+ */
+
+ rtcb = nxsched_self();
+
+ if (stat(filename, &st) == 0 &&
Review Comment:
Great catch @xiaoxiang781216, implemented and tested it.
Please check it now.
--
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]