]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ovl: fix lseek overflow on 32bit
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 3 Feb 2020 10:41:53 +0000 (11:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:35:24 +0000 (04:35 -0800)
commit08846286bf2854c0d4326315af260735759d6933
tree5e09f29513a000f5f4e1a3e859f56fe41f012b3a
parent809e16a6eeb39b263f13bee53a6c8c1befc4aad0
ovl: fix lseek overflow on 32bit

commit a4ac9d45c0cd14a2adc872186431c79804b77dbf upstream.

ovl_lseek() is using ssize_t to return the value from vfs_llseek().  On a
32-bit kernel ssize_t is a 32-bit signed int, which overflows above 2 GB.

Assign the return value of vfs_llseek() to loff_t to fix this.

Reported-by: Boris Gjenero <boris.gjenero@gmail.com>
Fixes: 9e46b840c705 ("ovl: support stacked SEEK_HOLE/SEEK_DATA")
Cc: <stable@vger.kernel.org> # v4.19
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/overlayfs/file.c