linux/arch/ia64/include/asm
Kees Cook d049f74f2d exec/ptrace: fix get_dumpable() incorrect tests
The get_dumpable() return value is not boolean.  Most users of the
function actually want to be testing for non-SUID_DUMP_USER(1) rather than
SUID_DUMP_DISABLE(0).  The SUID_DUMP_ROOT(2) is also considered a
protected state.  Almost all places did this correctly, excepting the two
places fixed in this patch.

Wrong logic:
    if (dumpable == SUID_DUMP_DISABLE) { /* be protective */ }
        or
    if (dumpable == 0) { /* be protective */ }
        or
    if (!dumpable) { /* be protective */ }

Correct logic:
    if (dumpable != SUID_DUMP_USER) { /* be protective */ }
        or
    if (dumpable != 1) { /* be protective */ }

Without this patch, if the system had set the sysctl fs/suid_dumpable=2, a
user was able to ptrace attach to processes that had dropped privileges to
that user.  (This may have been partially mitigated if Yama was enabled.)

The macros have been moved into the file that declares get/set_dumpable(),
which means things like the ia64 code can see them too.

CVE-2013-2929

Reported-by: Vasily Kulikov <segoon@openwall.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13 12:09:33 +09:00
..
native
sn
uv
xen cputime: Generic on-demand virtual cputime accounting 2013-01-27 19:23:27 +01:00
acpi-ext.h
acpi.h ACPICA: Update compilation environment settings. 2013-01-10 12:36:17 +01:00
agp.h
asm-offsets.h
asmmacro.h
atomic.h [IA64] Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts 2012-07-26 10:55:26 -07:00
barrier.h
bitops.h [IA64] Use asm-generic/bitops/builtin-ffs.h 2013-08-26 14:22:58 -07:00
bug.h
bugs.h
cache.h
cacheflush.h
checksum.h
clocksource.h
cpu.h
cputime.h cputime: Generic on-demand virtual cputime accounting 2013-01-27 19:23:27 +01:00
current.h
cyclone.h
delay.h
device.h driver core / ACPI: Move ACPI support to core device and driver types 2012-11-15 00:28:00 +01:00
div64.h
dma-mapping.h ia64: dma_debug: add debug_dma_mapping_error support 2012-11-28 15:28:58 +01:00
dma.h
dmi.h [IA64] dmi.h: Make dmi_alloc use kzalloc 2013-08-19 10:24:01 -07:00
elf.h default SET_PERSONALITY() in linux/elf.h 2013-02-26 02:46:08 -05:00
emergency-restart.h
esi.h
fb.h
fpswa.h
ftrace.h
futex.h Wrong asm register contraints in the futex implementation 2013-03-19 16:14:53 -07:00
gcc_intrin.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
gpio.h gpiolib/arches: Centralise bolierplate asm/gpio.h 2012-05-11 18:00:14 -06:00
hardirq.h
hpsim.h
hugetlb.h mm/hugetlb: add more arch-defined huge_pte functions 2013-04-29 15:54:33 -07:00
hw_irq.h
idle.h
intrinsics.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
io.h ia64: add early_memremap() alias for early_ioremap() 2013-09-05 13:29:28 +01:00
iommu_table.h
iommu.h iommu: Remove group_mf 2012-06-25 13:48:30 +02:00
iosapic.h IA64: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
irq_regs.h
irq_remapping.h iommu: rename intr_remapping.[ch] to irq_remapping.[ch] 2012-05-07 14:35:00 +02:00
irq.h
irqflags.h [IA64] Fix include dependency in asm/irqflags.h 2013-06-17 13:39:52 -07:00
Kbuild sched, arch: Create asm/preempt.h 2013-09-25 14:07:50 +02:00
kdebug.h
kexec.h
kmap_types.h
kprobes.h
kregs.h
kvm_host.h KVM: IA64: Carry non-ia64 changes into ia64 2013-04-26 20:27:27 +02:00
libata-portmap.h
linkage.h consolidate cond_syscall and SYSCALL_ALIAS declarations 2013-03-03 22:55:19 -05:00
local64.h
local.h
machvec_dig_vtd.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_dig.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_hpsim.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_hpzx1_swiotlb.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_hpzx1.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_init.h
machvec_sn2.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_uv.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_xen.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
mc146818rtc.h
mca_asm.h
mca.h Fix initialization of CMCI/CMCP interrupts 2013-04-02 09:37:06 -07:00
meminit.h
mman.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
mmu_context.h
mmu.h
mmzone.h
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
msidef.h
mutex.h arch: Make __mutex_fastpath_lock_retval return whether fastpath succeeded or not 2013-06-26 12:10:55 +02:00
nodedata.h
numa.h Fix build error for numa_clear_node() under IA64 2013-04-02 09:39:48 -07:00
page.h
pal.h
param.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
paravirt_patch.h
paravirt_privop.h
paravirt.h
parport.h IA64: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
patch.h
pci.h PCI/IA64: fix memleak for create pci root bus fail 2013-06-18 09:46:22 -07:00
percpu.h
perfmon.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
pgalloc.h
pgtable.h consolidate io_remap_pfn_range definitions 2013-06-29 12:46:35 +04:00
processor.h exec/ptrace: fix get_dumpable() incorrect tests 2013-11-13 12:09:33 +09:00
ptrace.h new helper: current_user_stack_pointer() 2012-12-19 18:07:39 -05:00
pvclock-abi.h
rwsem.h
sal.h
scatterlist.h
sections.h
segment.h
serial.h
shmparam.h
siginfo.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
signal.h consolidate kernel-side struct sigaction declarations 2013-02-03 15:09:22 -05:00
smp.h IA64: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
sparsemem.h
spinlock_types.h
spinlock.h lockref: Implement lockref for Itanium 2013-09-04 17:18:56 -07:00
string.h
swiotlb.h
switch_to.h cputime: Consolidate vtime handling on context switch 2012-08-20 13:05:28 +02:00
sync_bitops.h
syscall.h
termios.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
thread_info.h arch: Consolidate tsk_is_polling() 2013-04-08 17:39:22 +02:00
timex.h
tlb.h Fix TLB gather virtual address range invalidation corner cases 2013-08-16 08:52:46 -07:00
tlbflush.h
topology.h sched/numa: Rewrite the CONFIG_NUMA sched domain support 2012-05-09 15:00:55 +02:00
types.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
uaccess.h
unaligned.h
uncached.h
unistd.h consolidate cond_syscall and SYSCALL_ALIAS declarations 2013-03-03 22:55:19 -05:00
unwind.h
user.h
ustack.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
vga.h
xor.h