Jann Horn
b13d14339b
ppdev: fix double-free of pp->pdev->name
...
free_pardevice() is called by parport_unregister_device() and already frees
pp->pdev->name, don't try to do it again.
This bug causes kernel crashes.
I found and verified this with KASAN and some added pr_emerg()s:
[ 60.316568] pp_release: pp->pdev->name == ffff88039cb264c0
[ 60.316692] free_pardevice: freeing par_dev->name at ffff88039cb264c0
[ 60.316706] pp_release: kfree(ffff88039cb264c0)
[ 60.316714] ==========================================================
[ 60.316722] BUG: Double free or freeing an invalid pointer
[ 60.316731] Unexpected shadow byte: 0xFB
[ 60.316801] Object at ffff88039cb264c0, in cache kmalloc-32 size: 32
[ 60.316813] Allocated:
[ 60.316824] PID = 1695
[ 60.316869] Freed:
[ 60.316880] PID = 1695
[ 60.316935] ==========================================================
Signed-off-by: Jann Horn <jann@thejh.net>
Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10 15:24:02 +01:00
..
2016-08-18 22:36:23 +01:00
2016-10-19 11:20:21 +08:00
2016-10-03 09:09:47 -05:00
2016-08-31 14:22:49 +02:00
2016-05-20 20:57:27 -07:00
2016-09-27 12:02:13 +03:00
2015-06-12 16:58:33 -07:00
2016-08-31 14:47:54 +02:00
2014-01-07 13:50:28 +01:00
2014-05-27 17:43:12 -07:00
2016-08-31 14:12:35 +02:00
2014-07-09 16:59:15 -07:00
2016-07-14 16:21:53 +09:00
2015-09-20 19:32:35 -07:00
2015-12-09 13:00:45 -05:00
2014-11-07 11:24:01 -08:00
2016-02-17 09:39:56 +01:00
2016-08-05 09:48:22 -04:00
2013-12-18 16:39:54 -08:00
2016-08-05 09:48:22 -04:00
2015-12-09 13:00:45 -05:00
2016-08-31 15:21:18 +02:00
2015-08-05 10:35:49 -07:00
2016-01-22 17:02:18 -08:00
2016-02-08 14:57:30 -08:00
2016-02-09 17:39:56 -08:00
2015-12-23 10:41:31 -05:00
2016-06-29 17:33:46 +10:00
2016-11-10 15:24:02 +01:00
2016-01-22 18:04:28 -05:00
2016-10-15 10:03:15 -07:00
2016-02-08 14:57:30 -08:00
2013-10-16 12:36:10 -07:00
2013-10-16 12:36:10 -07:00
2016-08-31 14:47:54 +02:00
2016-09-27 21:06:22 -04:00
2016-10-05 18:36:18 -04:00
2016-08-30 14:45:50 +02:00
2013-10-16 12:36:10 -07:00
2015-08-05 17:26:00 -07:00
2016-09-13 17:30:17 +02:00
2016-10-11 15:06:33 -07:00