<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/Documentation/sysctl, branch v3.4.73</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/Documentation/sysctl?h=v3.4.73</id>
<link rel='self' href='https://git.amat.us/linux/atom/Documentation/sysctl?h=v3.4.73'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-12-04T18:50:14Z</updated>
<entry>
<title>vsprintf: check real user/group id for %pK</title>
<updated>2013-12-04T18:50:14Z</updated>
<author>
<name>Ryan Mallon</name>
<email>rmallon@gmail.com</email>
</author>
<published>2013-11-12T23:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=22363fb4b996766c83d25f47f2de605a6720ccf0'/>
<id>urn:sha1:22363fb4b996766c83d25f47f2de605a6720ccf0</id>
<content type='text'>
commit 312b4e226951f707e120b95b118cbc14f3d162b2 upstream.

Some setuid binaries will allow reading of files which have read
permission by the real user id.  This is problematic with files which
use %pK because the file access permission is checked at open() time,
but the kptr_restrict setting is checked at read() time.  If a setuid
binary opens a %pK file as an unprivileged user, and then elevates
permissions before reading the file, then kernel pointer values may be
leaked.

This happens for example with the setuid pppd application on Ubuntu 12.04:

  $ head -1 /proc/kallsyms
  00000000 T startup_32

  $ pppd file /proc/kallsyms
  pppd: In file /proc/kallsyms: unrecognized option 'c1000000'

This will only leak the pointer value from the first line, but other
setuid binaries may leak more information.

Fix this by adding a check that in addition to the current process having
CAP_SYSLOG, that effective user and group ids are equal to the real ids.
If a setuid binary reads the contents of a file which uses %pK then the
pointer values will be printed as NULL if the real user is unprivileged.

Update the sysctl documentation to reflect the changes, and also correct
the documentation to state the kptr_restrict=0 is the default.

This is a only temporary solution to the issue.  The correct solution is
to do the permission check at open() time on files, and to replace %pK
with a function which checks the open() time permission.  %pK uses in
printk should be removed since no sane permission check can be done, and
instead protected by using dmesg_restrict.

Signed-off-by: Ryan Mallon &lt;rmallon@gmail.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Documentation: add missing tainted bits to Documentation/sysctl/kernel.txt</title>
<updated>2012-02-07T00:29:19Z</updated>
<author>
<name>Larry Finger</name>
<email>Larry.Finger@lwfinger.net</email>
</author>
<published>2012-02-06T17:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f5fe184b08daf0c34b0de0d02c7033fe119dbf0a'/>
<id>urn:sha1:f5fe184b08daf0c34b0de0d02c7033fe119dbf0a</id>
<content type='text'>
Two of the bits in the tainted flag are not documented.

Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>sysctl: add the kernel.ns_last_pid control</title>
<updated>2012-01-13T04:13:11Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@parallels.com</email>
</author>
<published>2012-01-13T01:20:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b8f566b04d3cddd192cfd2418ae6d54ac6353792'/>
<id>urn:sha1:b8f566b04d3cddd192cfd2418ae6d54ac6353792</id>
<content type='text'>
The sysctl works on the current task's pid namespace, getting and setting
its last_pid field.

Writing is allowed for CAP_SYS_ADMIN-capable tasks thus making it possible
to create a task with desired pid value.  This ability is required badly
for the checkpoint/restore in userspace.

This approach suits all the parties for now.

Signed-off-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Serge Hallyn &lt;serue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>x86: Panic on detection of stack overflow</title>
<updated>2011-12-05T10:37:47Z</updated>
<author>
<name>Mitsuo Hayasaka</name>
<email>mitsuo.hayasaka.hu@hitachi.com</email>
</author>
<published>2011-11-29T06:08:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=55af77969fbd7a841838220ea2287432e0da8ae5'/>
<id>urn:sha1:55af77969fbd7a841838220ea2287432e0da8ae5</id>
<content type='text'>
Currently, messages are just output on the detection of stack
overflow, which is not sufficient for systems that need a
high reliability. This is because in general the overflow may
corrupt data, and the additional corruption may occur due to
reading them unless systems stop.

This patch adds the sysctl parameter
kernel.panic_on_stackoverflow and causes a panic when detecting
the overflows of kernel, IRQ and exception stacks except user
stack according to the parameter. It is disabled by default.

Signed-off-by: Mitsuo Hayasaka &lt;mitsuo.hayasaka.hu@hitachi.com&gt;
Cc: yrl.pp-manager.tt@hitachi.com
Cc: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Link: http://lkml.kernel.org/r/20111129060836.11076.12323.stgit@ltc219.sdl.hitachi.co.jp
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>kernel/sysctl.c: add cap_last_cap to /proc/sys/kernel</title>
<updated>2011-11-01T00:30:53Z</updated>
<author>
<name>Dan Ballard</name>
<email>dan@mindstab.net</email>
</author>
<published>2011-11-01T00:11:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=73efc0394e148d0e15583e13712637831f926720'/>
<id>urn:sha1:73efc0394e148d0e15583e13712637831f926720</id>
<content type='text'>
Userspace needs to know the highest valid capability of the running
kernel, which right now cannot reliably be retrieved from the header files
only.  The fact that this value cannot be determined properly right now
creates various problems for libraries compiled on newer header files
which are run on older kernels.  They assume capabilities are available
which actually aren't.  libcap-ng is one example.  And we ran into the
same problem with systemd too.

Now the capability is exported in /proc/sys/kernel/cap_last_cap.

[akpm@linux-foundation.org: make cap_last_cap const, per Ulrich]
Signed-off-by: Dan Ballard &lt;dan@mindstab.net&gt;
Cc: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Lennart Poettering &lt;lennart@poettering.net&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Ulrich Drepper &lt;drepper@akkadia.org&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipc: introduce shm_rmid_forced sysctl</title>
<updated>2011-07-26T23:49:44Z</updated>
<author>
<name>Vasiliy Kulikov</name>
<email>segoon@openwall.com</email>
</author>
<published>2011-07-26T23:08:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b34a6b1da371ed8af1221459a18c67970f7e3d53'/>
<id>urn:sha1:b34a6b1da371ed8af1221459a18c67970f7e3d53</id>
<content type='text'>
Add support for the shm_rmid_forced sysctl.  If set to 1, all shared
memory objects in current ipc namespace will be automatically forced to
use IPC_RMID.

The POSIX way of handling shmem allows one to create shm objects and
call shmdt(), leaving shm object associated with no process, thus
consuming memory not counted via rlimits.

With shm_rmid_forced=1 the shared memory object is counted at least for
one process, so OOM killer may effectively kill the fat process holding
the shared memory.

It obviously breaks POSIX - some programs relying on the feature would
stop working.  So set shm_rmid_forced=1 only if you're sure nobody uses
"orphaned" memory.  Use shm_rmid_forced=0 by default for compatability
reasons.

The feature was previously impemented in -ow as a configure option.

[akpm@linux-foundation.org: fix documentation, per Randy]
[akpm@linux-foundation.org: fix warning]
[akpm@linux-foundation.org: readability/conventionality tweaks]
[akpm@linux-foundation.org: fix shm_rmid_forced/shm_forced_rmid confusion, use standard comment layout]
Signed-off-by: Vasiliy Kulikov &lt;segoon@openwall.com&gt;
Cc: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: "Serge E. Hallyn" &lt;serge.hallyn@canonical.com&gt;
Cc: Daniel Lezcano &lt;daniel.lezcano@free.fr&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: Solar Designer &lt;solar@openwall.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation: refresh sysctl/kernel.txt</title>
<updated>2011-07-23T17:58:08Z</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@alien8.de</email>
</author>
<published>2011-07-23T17:39:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=807094c0b1c41344def32b249d9faf7b5ebeb1e7'/>
<id>urn:sha1:807094c0b1c41344def32b249d9faf7b5ebeb1e7</id>
<content type='text'>
Refresh sysctl/kernel.txt.  More specifically,

 - drop stale index entries
 - sync and sort index and entries
 - reflow sticking out paragraphs to colwidth 72
 - correct typos
 - cleanup whitespace

Signed-off-by: Borislav Petkov &lt;bp@alien8.de&gt;
Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>coredump: add support for exe_file in core name</title>
<updated>2011-05-27T00:12:36Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2011-05-26T23:25:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=57cc083ad9e1bfeeb4a0ee831e7bb008c8865bf0'/>
<id>urn:sha1:57cc083ad9e1bfeeb4a0ee831e7bb008c8865bf0</id>
<content type='text'>
Now, exe_file is not proc FS dependent, so we can use it to name core
file.  So we add %E pattern for core file name cration which extract path
from mm_struct-&gt;exe_file.  Then it converts slashes to exclamation marks
and pastes the result to the core file name itself.

This is useful for environments where binary names are longer than 16
character (the current-&gt;comm limitation).  Also where there are binaries
with same name but in a different path.  Further in case the binery itself
changes its current-&gt;comm after exec.

So by doing (s/$/#/ -- # is treated as git comment):

  $ sysctl kernel.core_pattern='core.%p.%e.%E'
  $ ln /bin/cat cat45678901234567890
  $ ./cat45678901234567890
  ^Z
  $ rm cat45678901234567890
  $ fg
  ^\Quit (core dumped)
  $ ls core*

we now get:

  core.2434.cat456789012345.!root!cat45678901234567890 (deleted)

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Reviewed-by: Andi Kleen &lt;andi@firstfloor.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation: update epoll sysctl text</title>
<updated>2011-05-23T22:14:11Z</updated>
<author>
<name>Lucian Adrian Grijincu</name>
<email>lucian.grijincu@gmail.com</email>
</author>
<published>2011-05-23T18:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=52307a9e1d8910e205f6be2c4dd35900f7b11282'/>
<id>urn:sha1:52307a9e1d8910e205f6be2c4dd35900f7b11282</id>
<content type='text'>
max_user_instances was removed in this commit:

   commit 9df04e1f25effde823a600e755b51475d438f56b
   Author: Davide Libenzi &lt;davidel@xmailserver.org&gt;
   Date:   Thu Jan 29 14:25:26 2009 -0800

    epoll: drop max_user_instances and rely only on max_user_watches

but the documentation entry was not removed.

Cc: Davide Libenzi &lt;davidel@xmailserver.org&gt;
Signed-off-by: Lucian Adrian Grijincu &lt;lucian.grijincu@gmail.com&gt;
Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2011-05-23T16:12:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-05-23T16:12:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=57d19e80f459dd845fb3cfeba8e6df8471bac142'/>
<id>urn:sha1:57d19e80f459dd845fb3cfeba8e6df8471bac142</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  b43: fix comment typo reqest -&gt; request
  Haavard Skinnemoen has left Atmel
  cris: typo in mach-fs Makefile
  Kconfig: fix copy/paste-ism for dell-wmi-aio driver
  doc: timers-howto: fix a typo ("unsgined")
  perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c
  md, raid5: Fix spelling error in comment ('Ofcourse' --&gt; 'Of course').
  treewide: fix a few typos in comments
  regulator: change debug statement be consistent with the style of the rest
  Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
  audit: acquire creds selectively to reduce atomic op overhead
  rtlwifi: don't touch with treewide double semicolon removal
  treewide: cleanup continuations and remove logging message whitespace
  ath9k_hw: don't touch with treewide double semicolon removal
  include/linux/leds-regulator.h: fix syntax in example code
  tty: fix typo in descripton of tty_termios_encode_baud_rate
  xtensa: remove obsolete BKL kernel option from defconfig
  m68k: fix comment typo 'occcured'
  arch:Kconfig.locks Remove unused config option.
  treewide: remove extra semicolons
  ...
</content>
</entry>
</feed>
