UPSTREAM: fs: erofs: add sanity check for kobject in erofs_unregister_sysfs
[ Upstream commit a942da24 ] Syzkaller hit 'WARNING: kobject bug in erofs_unregister_sysfs'. This bug is triggered by injecting fault in kobject_init_and_add of erofs_unregister_sysfs. Fix this by adding sanity check for kobject in erofs_unregister_sysfs Note that I've tested the patch and the crash does not occur any more. Link: https://lore.kernel.org/r/20220315132814.12332-1-dzm91@hust.edu.cn Change-Id: I8d26b9f82758d8c0bbb2832150de2f289e17fe2b Signed-off-by:Dongliang Mu <mudongliangabcd@gmail.com> Fixes: 168e9a76 ("erofs: add sysfs interface") Reviewed-by:
Gao Xiang <hsiangkao@linux.alibaba.com> Reviewed-by:
Chao Yu <chao@kernel.org> Signed-off-by:
Gao Xiang <hsiangkao@linux.alibaba.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Reported-by:
<syzbot+4d15e77deaec58116d46@syzkaller.appspotmail.com> Fixes: 3450010a ("UPSTREAM: erofs: add sysfs interface") Signed-off-by:
Jun Nie <jun.nie@linaro.org>
Loading
Please sign in to comment