Searched hist:ecebf55d (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/ext2/ |
H A D | xattr.c | ecebf55d Sat Nov 24 18:58:02 CST 2018 Pan Bian <bianpan2016@163.com> ext2: fix potential use after free
The function ext2_xattr_set calls brelse(bh) to drop the reference count of bh. After that, bh may be freed. However, following brelse(bh), it reads bh->b_data via macro HDR(bh). This may result in a use-after-free bug. This patch moves brelse(bh) after reading field.
CC: stable@vger.kernel.org Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Jan Kara <jack@suse.cz> ecebf55d Sat Nov 24 18:58:02 CST 2018 Pan Bian <bianpan2016@163.com> ext2: fix potential use after free The function ext2_xattr_set calls brelse(bh) to drop the reference count of bh. After that, bh may be freed. However, following brelse(bh), it reads bh->b_data via macro HDR(bh). This may result in a use-after-free bug. This patch moves brelse(bh) after reading field. CC: stable@vger.kernel.org Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Jan Kara <jack@suse.cz>
|