aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-debug.h
diff options
context:
space:
mode:
authorDongliang Mu <[email protected]>2022-08-16 12:08:58 +0800
committerAl Viro <[email protected]>2022-09-01 17:30:24 -0400
commit2e488f13755ffbb60f307e991b27024716a33b29 (patch)
treefa967a2ec7ee9bfdfddba2f6e73f91d7bbff075c /drivers/usb/cdns3/cdns3-debug.h
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff)
fs: fix UAF/GPF bug in nilfs_mdt_destroy
In alloc_inode, inode_init_always() could return -ENOMEM if security_inode_alloc() fails, which causes inode->i_private uninitialized. Then nilfs_is_metadata_file_inode() returns true and nilfs_free_inode() wrongly calls nilfs_mdt_destroy(), which frees the uninitialized inode->i_private and leads to crashes(e.g., UAF/GPF). Fix this by moving security_inode_alloc just prior to this_cpu_inc(nr_inodes) Link: https://lkml.kernel.org/r/CAFcO6XOcf1Jj2SeGt=jJV59wmhESeSKpfR0omdFRq+J9nD1vfQ@mail.gmail.com Reported-by: butt3rflyh4ck <[email protected]> Reported-by: Hao Sun <[email protected]> Reported-by: Jiacheng Xu <[email protected]> Reviewed-by: Christian Brauner (Microsoft) <[email protected]> Signed-off-by: Dongliang Mu <[email protected]> Cc: Al Viro <[email protected]> Cc: [email protected] Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions