summaryrefslogtreecommitdiff
path: root/lib/kobject.c
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2018-11-25 08:58:02 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-13 09:21:27 +0100
commit89ed5b72e5595284034a202baa70021c7cb3adde (patch)
tree1579e03dc40c498633ae05dcc9cd397f9e5affac /lib/kobject.c
parent4d5f99ec00b7cfcdaabc39b016e2dddb2b762e7f (diff)
ext2: fix potential use after free
commit ecebf55d27a11538ea84aee0be643dd953f830d5 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/kobject.c')
0 files changed, 0 insertions, 0 deletions