diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1660,6 +1660,9 @@ SYSCALL_DEFINE3(io_submit, aio_context_t, ctx_id, long, nr, if (unlikely(nr < 0)) return -EINVAL; + if (unlikely(nr > LONG_MAX/sizeof(*iocbpp))) + nr = LONG_MAX/sizeof(*iocbpp); + if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(*iocbpp))))) return -EFAULT; |