lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <C04D8700-C96F-4340-A27C-D1830184A26C@illinois.edu>
Date: Wed, 17 Jan 2024 15:27:44 +0000
From: "Yang, Chenyuan" <cy54@...inois.edu>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>
Subject: WARNING: zero-size vmalloc in ubi_read_volume_table

Hello,
 
We detected one crash, “WARNING: zero-size vmalloc in ubi_read_volume_table” for the volume management system UBI (under linux/drivers/mtd/ubi) by using our generated syscall specification for it.
 
This crash is triggered by `create_empty_lvol` (https://elixir.bootlin.com/linux/v6.7/source/drivers/mtd/ubi/vtbl.c#L484), which allocates a zero-size memory by using `vzalloc`. Additionally, this issue is associated with the `/dev/ubi_ctrl` driver, particularly when using IOCTL with the command value UBI_IOCATT. The size allocated can be manipulated through the `ubi_attach_req` argument by altering the `vid_hdr_offset` and `max_beb_per1024` fields.
 
To fix this issue, it would be better to implement a check step in the `create_empty_lvol` function.
 
The crash is reproducible by a C program, which is attached in the file.
If you have any questions or require more information, please feel free to contact us.
 
Best,
Chenyuan


Download attachment "repro.cprog" of type "application/octet-stream" (1225 bytes)

Download attachment "repro.log" of type "application/octet-stream" (15879 bytes)

Download attachment "repro.prog" of type "application/octet-stream" (640 bytes)

Download attachment "repro.report" of type "application/octet-stream" (2569 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ