Re: [PATCH v2 11/11] ext4: access to uninitialized bh fields in ext4_xattr_set_handle()

2018-10-31 Thread Andreas Dilger
On Oct 30, 2018, at 9:39 PM, Vasily Averin wrote: > > On 10/31/2018 04:30 AM, Andreas Dilger wrote: >> Could you please explain your statement below that on-stack >> initialization does not zero unspecified fields? According >> to documents I found, for example: >> >> https://gcc.gnu.org/online

Re: [PATCH v2 11/11] ext4: access to uninitialized bh fields in ext4_xattr_set_handle()

2018-10-30 Thread Vasily Averin
On 10/31/2018 04:30 AM, Andreas Dilger wrote: > Could you please explain your statement below that on-stack > initialization does not zero unspecified fields?  According  > to documents I found, for example: > > https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html > > they *are* initialized t

[PATCH v2 11/11] ext4: access to uninitialized bh fields in ext4_xattr_set_handle()

2018-10-30 Thread Vasily Averin
On-stack initialization does not guarantee zeroying of unintialized fields. So is.iloc.bh and bs.bh can be contain garbage of old stack conent. Errors in the beginning of ext4_xattr_set_handle() function lead to jump to "cleanup:" label where brelse(is.iloc.bh) and brelse(bs.bh) can access uniniti