block: ioctl: fix information leak to userland
Structure hd_geometry is copied to userland with 4 padding bytes between cylinders and start fields uninitialized on 64-bit platforms. It leads to leaking of contents of kernel stack memory. Currently there is no memset() in real implementations of getgeo() in drivers/block/, so it makes sense to have memset() in blkdev_ioctl(). Signed-off-by: NVasiliy Kulikov <segooon@gmail.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
Showing
想要评论请 注册 或 登录