casaroli commented on code in PR #21902: URL: https://github.com/apache/nuttx/pull/21902#discussion_r4592469759
########## libs/libc/stdlib/lib_arc4random.c: ########## Review Comment: In the kernel, open() is nx_open(): it puts the descriptor into the file table of the calling task (fs/vfs/fs_open.c:532), resolves the path in the root of the caller (fs/inode/fs_inodesearch.c:421), and sets the errno of the caller on an error. So bind() of a task with a full file table succeeds with errno EMFILE left behind, and in a chroot() jail without /dev the open fails. Both times arc4random_buf() falls back to the clock() hash: the UDP/TCP port base and the TCP ISN key then come from the clock, which any task can compute. file_open() uses no descriptor, errno or root of the caller. -- 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]
