This is a note to let you know that I've just added the patch titled firewire: add minor number range check to fw_device_init() to the 3.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: firewire-add-minor-number-range-check-to-fw_device_init.patch and it can be found in the queue-3.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 3bec60d511179853138836ae6e1b61fe34d9235f Mon Sep 17 00:00:00 2001 From: Tejun Heo <tj@xxxxxxxxxx> Date: Wed, 27 Feb 2013 17:04:04 -0800 Subject: firewire: add minor number range check to fw_device_init() From: Tejun Heo <tj@xxxxxxxxxx> commit 3bec60d511179853138836ae6e1b61fe34d9235f upstream. fw_device_init() didn't check whether the allocated minor number isn't too large. Fail if it goes overflows MINORBITS. Signed-off-by: Tejun Heo <tj@xxxxxxxxxx> Suggested-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx> Acked-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/firewire/core-device.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -999,6 +999,10 @@ static void fw_device_init(struct work_s ret = idr_pre_get(&fw_device_idr, GFP_KERNEL) ? idr_get_new(&fw_device_idr, device, &minor) : -ENOMEM; + if (minor >= 1 << MINORBITS) { + idr_remove(&fw_device_idr, minor); + minor = -ENOSPC; + } up_write(&fw_device_rwsem); if (ret < 0) Patches currently in stable-queue which might be from tj@xxxxxxxxxx are queue-3.4/firewire-add-minor-number-range-check-to-fw_device_init.patch queue-3.4/posix-timer-don-t-call-idr_find-with-out-of-range-id.patch queue-3.4/block-fix-synchronization-and-limit-check-in-blk_alloc_devt.patch queue-3.4/idr-fix-a-subtle-bug-in-idr_get_next.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html