Files
linux/fs
Dongliang Mu 7923c77f8f UPSTREAM: fs: erofs: add sanity check for kobject in erofs_unregister_sysfs
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.

Bug: 254441685
Link: https://lore.kernel.org/r/20220315132814.12332-1-dzm91@hust.edu.cn
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Fixes: 168e9a7620 ("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>
(cherry picked from commit a942da24ab)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I9b074a6b2d087b1fa4bd4fa50ccfda46d56c98d8
2022-11-25 13:38:34 +00:00
..
2022-02-05 13:23:26 +01:00
2021-05-13 14:22:11 +02:00
2021-02-18 11:21:01 +01:00
2021-12-14 11:32:40 +01:00