Skip to content

Commit bebfef1

Browse files
keesdedekind
authored andcommitted
UBI: avoid workqueue format string leak
When building the name for the workqueue thread, make sure a format string cannot leak in from the disk name. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
1 parent 3d21bb7 commit bebfef1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/mtd/ubi/block.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ int ubiblock_create(struct ubi_volume_info *vi)
431431
* Create one workqueue per volume (per registered block device).
432432
* Rembember workqueues are cheap, they're not threads.
433433
*/
434-
dev->wq = alloc_workqueue(gd->disk_name, 0, 0);
434+
dev->wq = alloc_workqueue("%s", 0, 0, gd->disk_name);
435435
if (!dev->wq)
436436
goto out_free_queue;
437437
INIT_WORK(&dev->work, ubiblock_do_work);

0 commit comments

Comments
 (0)