]> git.baikalelectronics.ru Git - kernel.git/commit
nilfs2: check size of array structured data exchanged via ioctls
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Mon, 11 May 2009 14:24:47 +0000 (23:24 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Mon, 11 May 2009 16:48:54 +0000 (01:48 +0900)
commit4ba12514af9473854bb660fa8091f0c8b04d3f49
tree008c96d1017b835e3d54344c0a2c77d780086979
parentebd6f34ab79c59374526cf86a9bdf2315856c6bf
nilfs2: check size of array structured data exchanged via ioctls

Although some ioctls of nilfs2 exchange data in the form of indirectly
referenced array, some of them lack size check on the array elements.

This inserts the missing checks and rejects requests if data of ioctl
does not have a valid format.

We usually don't have to check size of structures that we associated
with ioctl commands because the size is tested implicitly for
identifying ioctl command; the checks this patch adds are for the
cases where the implicit check is not applied.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/ioctl.c