aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev_api.c
diff options
context:
space:
mode:
authorEdward Adam Davis <[email protected]>2024-10-14 12:16:38 +0000
committerKonstantin Komarov <[email protected]>2025-02-05 14:48:40 +0000
commitff355926445897cc9fdea3b00611e514232c213c (patch)
tree0e0bafe48257a80de3f2cb9a73f1adb14a7db824 /net/core/dev_api.c
parentfs/ntfs3: Fix 'proc_info_root' leak when init ntfs failed (diff)
downloadkernel-ff355926445897cc9fdea3b00611e514232c213c.tar.gz
kernel-ff355926445897cc9fdea3b00611e514232c213c.zip
fs/ntfs3: Fix WARNING in ntfs_extend_initialized_size
Syzbot reported a WARNING in ntfs_extend_initialized_size. The data type of in->i_valid and to is u64 in ntfs_file_mmap(). If their values are greater than LLONG_MAX, overflow will occur because the data types of the parameters valid and new_valid corresponding to the function ntfs_extend_initialized_size() are loff_t. Before calling ntfs_extend_initialized_size() in the ntfs_file_mmap(), the "ni->i_valid < to" has been determined, so the same WARN_ON determination is not required in ntfs_extend_initialized_size(). Just execute the ntfs_extend_initialized_size() in ntfs_extend() to make a WARN_ON check. Reported-and-tested-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=e37dd1dfc814b10caa55 Signed-off-by: Edward Adam Davis <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
Diffstat (limited to 'net/core/dev_api.c')
0 files changed, 0 insertions, 0 deletions