lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 15 Mar 2022 13:39:41 -0700 From: Tadeusz Struk <tadeusz.struk@...aro.org> To: Theodore Ts'o <tytso@....edu> Cc: Andreas Dilger <adilger.kernel@...ger.ca>, Ritesh Harjani <riteshh@...ux.ibm.com>, linux-ext4@...r.kernel.org, stable@...r.kernel.org, linux-kernel@...r.kernel.org, syzbot+7a806094edd5d07ba029@...kaller.appspotmail.com Subject: Re: [PATCH] ext4: check if offset+length is within a valid range in fallocate On 3/15/22 12:15, Tadeusz Struk wrote: > @@ -3967,6 +3968,16 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length) > offset; > } > > + /* > + * For punch hole the length + offset needs to be at least within > + * one block before last > + */ > + max_length = sbi->s_bitmap_maxbytes - sbi->s_blocksize; that supposed to be: max_length = sbi->s_bitmap_maxbytes - inode->i_sb->s_blocksize; Please ignore this one. I will send a new version soon. Sorry for the noise. > + if (offset + length >= max_length) { > + ret = -ENOSPC; > + goto out_mutex; > + } > + -- Thanks, Tadeusz
Powered by blists - more mailing lists