diff options
| author | Denis Arefev <arefev@swemel.ru> | 2024-12-02 12:36:52 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-17 10:05:24 +0100 |
| commit | 15fd2e1ad5da149e27bda9d48e812c87a60f39c9 (patch) | |
| tree | 7f1e14b78a78008c5ff9c0ebc28a20a931faced1 /scripts/checkstack.pl | |
| parent | 247abefeb50d56c83ce7abda5a378e395ee8af72 (diff) | |
| download | linux-15fd2e1ad5da149e27bda9d48e812c87a60f39c9.tar.gz linux-15fd2e1ad5da149e27bda9d48e812c87a60f39c9.tar.bz2 linux-15fd2e1ad5da149e27bda9d48e812c87a60f39c9.zip | |
ubi: Add a check for ubi_num
commit 97bbf9e312c3fbaf0baa56120238825d2eb23b8a upstream.
Added a check for ubi_num for negative numbers
If the variable ubi_num takes negative values then we get:
qemu-system-arm ... -append "ubi.mtd=0,0,0,-22222345" ...
[ 0.745065] ubi_attach_mtd_dev from ubi_init+0x178/0x218
[ 0.745230] ubi_init from do_one_initcall+0x70/0x1ac
[ 0.745344] do_one_initcall from kernel_init_freeable+0x198/0x224
[ 0.745474] kernel_init_freeable from kernel_init+0x18/0x134
[ 0.745600] kernel_init from ret_from_fork+0x14/0x28
[ 0.745727] Exception stack(0x90015fb0 to 0x90015ff8)
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 83ff59a06663 ("UBI: support ubi_num on mtd.ubi command line")
Cc: stable@vger.kernel.org
Signed-off-by: Denis Arefev <arefev@swemel.ru>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/checkstack.pl')
0 files changed, 0 insertions, 0 deletions
