syscall: msg: validate iovec array itself as well as the buffers it points to
This commit is contained in:
@@ -165,6 +165,10 @@ static bool validate_iovec(
|
|||||||
size_t count,
|
size_t count,
|
||||||
bool rw)
|
bool rw)
|
||||||
{
|
{
|
||||||
|
if (!validate_access_r(task, iov, count * sizeof(struct iovec))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < count; i++) {
|
for (size_t i = 0; i < count; i++) {
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
const struct iovec *vec = &iov[i];
|
const struct iovec *vec = &iov[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user