nuttx
nuttx copied to clipboard
{bp-16490} fs/vfs: check if all iov_base are accessible
Summary
Check if all iov_base are inside accessible address space. e.g.
ret = write(fd, NULL, 3);
The iov.iov_base is NULL but iov.iov_len is NOT zero.
Lines 425 to 432 in dd07367 ssize_t write(int fd, FAR const void *buf, size_t nbytes) { struct iovec iov;
iov.iov_base = (void *)buf; iov.iov_len = nbytes; return writev(fd, &iov, 1); }
And, if iov.iov_base is not NULL but iov.iov_len is zero, skipped (same as Linux).
Impact
RELEASE
Testing
CI