Julien Tinnes
62a9fca67f
Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code
...
commit da48524eb2 upstream.
Userland should be able to trust the pid and uid of the sender of a
signal if the si_code is SI_TKILL.
Unfortunately, the kernel has historically allowed sigqueueinfo() to
send any si_code at all (as long as it was negative - to distinguish it
from kernel-generated signals like SIGILL etc), so it could spoof a
SI_TKILL with incorrect siginfo values.
Happily, it looks like glibc has always set si_code to the appropriate
SI_QUEUE, so there are probably no actual user code that ever uses
anything but the appropriate SI_QUEUE flag.
So just tighten the check for si_code (we used to allow any negative
value), and add a (one-time) warning in case there are binaries out
there that might depend on using other si_code values.
Signed-off-by: Julien Tinnes <jln@google.com >
Acked-by: Oleg Nesterov <oleg@redhat.com >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-03-27 11:30:34 -07:00
..
2010-09-20 13:17:53 -07:00
2011-03-02 09:46:55 -05:00
2011-03-02 09:46:50 -05:00
2011-03-07 15:17:54 -08:00
2011-03-23 13:16:39 -07:00
2008-02-09 23:27:01 -08:00
2009-12-18 14:03:52 -08:00
2009-06-08 12:31:53 -07:00
2010-01-18 10:19:50 -08:00
2009-09-24 03:50:25 -04:00
2009-09-24 03:50:26 -04:00
2009-06-24 00:02:38 -04:00
2009-06-24 00:00:52 -04:00
2009-09-24 03:50:26 -04:00
2008-06-27 18:09:16 +02:00
2008-04-29 08:06:29 -07:00
2011-02-17 15:37:19 -08:00
2010-04-26 07:41:17 -07:00
2010-01-18 10:19:32 -08:00
2010-09-20 13:17:57 -07:00
2008-10-20 08:52:34 -07:00
2010-09-20 13:18:08 -07:00
2011-03-14 14:29:52 -07:00
2011-03-02 09:46:39 -05:00
2009-09-18 09:48:52 -07:00
2008-10-16 11:21:30 -07:00
2009-03-31 23:00:27 -04:00
2011-02-17 15:37:19 -08:00
2009-04-05 11:04:19 -07:00
2010-09-20 13:18:02 -07:00
2009-07-18 14:19:53 +02:00
2009-08-10 15:41:12 +02:00
2010-11-22 10:47:31 -08:00
2010-09-20 13:17:54 -07:00
2010-10-28 21:44:01 -07:00
2009-09-24 07:21:04 -07:00
2009-08-29 14:10:07 +02:00
2009-09-23 07:39:30 -07:00
2008-10-20 08:52:34 -07:00
2008-07-28 14:37:38 +02:00
2008-12-25 09:31:28 +01:00
2009-07-29 19:10:34 -07:00
2009-09-19 13:13:17 -07:00
2009-05-15 07:56:24 -05:00
2009-09-23 18:12:10 -07:00
2009-10-01 16:11:11 -07:00
2011-02-17 15:37:19 -08:00
2010-04-01 15:58:46 -07:00
2010-12-09 13:26:51 -08:00
2009-07-24 10:53:29 +02:00
2009-09-23 07:39:29 -07:00
2009-02-14 23:27:59 +01:00
2010-06-01 09:45:46 -07:00
2009-12-01 08:20:31 -08:00
2010-08-02 10:20:47 -07:00
2009-10-11 11:20:58 -07:00
2009-01-14 18:09:02 +01:00
2010-07-05 11:10:31 -07:00
2009-01-14 18:09:02 +01:00
2008-11-26 08:22:50 +01:00
2009-09-24 07:20:58 -07:00
2009-06-18 13:03:56 -07:00
2009-10-08 12:16:35 -07:00
2009-10-29 08:56:20 +10:30
2011-03-24 08:01:34 -07:00
2009-09-24 07:21:04 -07:00
2009-09-22 07:17:38 -07:00
2008-09-02 19:21:40 -07:00
2009-08-29 14:10:07 +02:00
2010-07-05 11:10:30 -07:00
2011-01-07 14:43:03 -08:00
2010-05-26 14:29:18 -07:00
2011-02-17 15:37:03 -08:00
2009-10-07 08:11:20 +02:00
2009-09-23 19:46:30 +02:00
2009-12-18 14:03:04 -08:00
2009-10-07 08:11:20 +02:00
2009-12-18 14:03:01 -08:00
2009-12-18 14:03:04 -08:00
2009-09-27 11:39:25 -07:00
2009-10-01 16:11:13 -07:00
2009-09-23 07:39:41 -07:00
2009-04-06 11:14:02 +02:00
2008-02-08 09:22:41 -08:00
2008-07-21 21:55:02 -07:00
2009-08-06 05:50:21 +02:00
2010-01-22 15:18:30 -08:00
2009-08-02 14:26:09 +02:00
2009-03-30 22:05:17 +10:30
2011-02-17 15:37:19 -08:00
2011-02-17 15:37:30 -08:00
2011-02-17 15:37:27 -08:00
2010-09-20 13:18:09 -07:00
2011-02-17 15:37:26 -08:00
2009-03-24 23:16:51 +01:00
2011-03-23 13:16:39 -07:00
2009-03-02 15:41:30 -08:00
2008-08-05 14:33:47 -07:00
2011-03-27 11:30:34 -07:00
2009-12-01 08:20:31 -08:00
2010-08-10 10:20:45 -07:00
2009-12-01 08:20:31 -08:00
2011-03-23 13:16:55 -07:00
2011-02-17 15:37:27 -08:00
2010-04-01 15:58:47 -07:00
2009-08-31 18:08:50 +02:00
2008-02-06 10:41:02 -08:00
2008-12-25 11:44:43 +01:00
2009-03-30 22:05:17 +10:30
2009-09-24 15:13:11 -07:00
2011-02-17 15:37:19 -08:00
2010-02-09 04:51:02 -08:00
2010-01-18 10:19:49 -08:00
2009-07-12 14:03:27 -07:00
2009-01-06 15:59:20 -08:00
2009-09-15 10:17:30 +02:00
2008-05-02 16:18:42 -07:00
2011-01-07 14:43:03 -08:00
2009-09-21 15:14:55 +02:00
2009-03-09 08:13:35 -07:00
2009-09-23 18:13:10 -07:00
2009-01-12 16:04:37 +01:00
2009-02-27 16:26:21 -08:00
2011-02-17 15:37:31 -08:00
2009-09-24 07:21:04 -07:00
2009-06-18 13:03:55 -07:00
2009-08-10 14:43:09 +02:00
2009-11-17 17:40:33 -08:00