Files
linux-st/include/linux
Andrew G. Morgan ca05a99a54 capabilities: remain source compatible with 32-bit raw legacy capability support.
Source code out there hard-codes a notion of what the
_LINUX_CAPABILITY_VERSION #define means in terms of the semantics of the
raw capability system calls capget() and capset().  Its unfortunate, but
true.

Since the confusing header file has been in a released kernel, there is
software that is erroneously using 64-bit capabilities with the semantics
of 32-bit compatibilities.  These recently compiled programs may suffer
corruption of their memory when sys_getcap() overwrites more memory than
they are coded to expect, and the raising of added capabilities when using
sys_capset().

As such, this patch does a number of things to clean up the situation
for all. It

  1. forces the _LINUX_CAPABILITY_VERSION define to always retain its
     legacy value.

  2. adopts a new #define strategy for the kernel's internal
     implementation of the preferred magic.

  3. deprecates v2 capability magic in favor of a new (v3) magic
     number. The functionality of v3 is entirely equivalent to v2,
     the only difference being that the v2 magic causes the kernel
     to log a "deprecated" warning so the admin can find applications
     that may be using v2 inappropriately.

[User space code continues to be encouraged to use the libcap API which
protects the application from details like this.  libcap-2.10 is the first
to support v3 capabilities.]

Fixes issue reported in https://bugzilla.redhat.com/show_bug.cgi?id=447518.
Thanks to Bojan Smojver for the report.

[akpm@linux-foundation.org: s/depreciate/deprecate/g]
[akpm@linux-foundation.org: be robust about put_user size]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: Bojan Smojver <bojan@rexursive.com>
Cc: stable@kernel.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2008-05-31 16:36:16 -07:00
..
2008-05-20 14:14:15 -07:00
2008-04-29 08:06:00 -07:00
2008-04-29 08:11:16 -07:00
2008-04-29 12:36:54 -07:00
2008-04-29 08:06:01 -07:00
2008-05-01 08:03:59 -07:00
2008-04-30 08:29:52 -07:00
2008-05-07 09:48:23 +02:00
2008-04-28 08:58:35 -07:00
2008-05-16 17:22:26 -04:00
2008-05-01 13:08:16 -04:00
2008-05-07 09:29:00 +02:00
2008-05-13 08:02:26 -07:00
2008-05-24 09:56:13 -07:00
2008-05-20 16:44:43 +02:00
2008-05-20 16:44:43 +02:00
2008-04-29 23:11:38 +02:00
2008-05-18 20:49:41 +02:00
2008-05-14 23:06:16 +02:00
2008-04-29 08:06:25 -07:00
2008-04-29 08:06:03 -07:00
2008-04-29 08:06:02 -07:00
2008-05-05 16:47:14 +10:00
2008-04-29 08:06:15 -07:00
2008-05-01 08:03:58 -07:00
2008-05-14 19:11:14 -07:00
2008-05-01 08:03:58 -07:00
2008-04-29 08:06:01 -07:00
2008-04-29 08:06:17 -07:00
2008-05-24 09:56:09 -07:00
2008-05-26 16:08:40 +02:00
2008-04-29 08:06:02 -07:00
2008-04-29 08:06:02 -07:00
2008-05-06 12:01:41 -04:00
2008-04-30 08:29:51 -07:00
2008-04-29 08:05:59 -07:00
2008-05-04 17:07:03 -07:00
2008-05-21 17:40:05 -07:00
2008-04-29 02:48:01 -04:00
2008-05-01 08:03:59 -07:00
2008-04-30 08:29:47 -07:00
2008-05-09 07:45:18 -07:00