Commit 294b0fa7 authored by Linus Torvalds's avatar Linus Torvalds

v2.4.0.12 -> v2.4.1

  - Al Viro: core file hardlink attack avoidance fix
parent c9b92268
VERSION = 2 VERSION = 2
PATCHLEVEL = 4 PATCHLEVEL = 4
SUBLEVEL = 1 SUBLEVEL = 1
EXTRAVERSION =-pre12 EXTRAVERSION =
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
...@@ -110,8 +110,7 @@ export ROOT_DEV = CURRENT ...@@ -110,8 +110,7 @@ export ROOT_DEV = CURRENT
export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA
# #
# if you want the RAM disk device, define this to be the # if you want the RAM disk device, define this to be the size in blocks.
# size in blocks.
# This is i386 specific. # This is i386 specific.
# #
......
...@@ -25,10 +25,9 @@ ...@@ -25,10 +25,9 @@
* loads pretty fast by getting whole tracks at a time whenever possible. * loads pretty fast by getting whole tracks at a time whenever possible.
*/ */
#include <linux/config.h> /* for CONFIG_ROOT_RDONLY */
#include <asm/boot.h> #include <asm/boot.h>
SETUPSECS = 4 /* default nr of setup-sectors */ SETUPSECTS = 4 /* default nr of setup-sectors */
BOOTSEG = 0x07C0 /* original address of boot-sector */ BOOTSEG = 0x07C0 /* original address of boot-sector */
INITSEG = DEF_INITSEG /* we move boot here - out of the way */ INITSEG = DEF_INITSEG /* we move boot here - out of the way */
SETUPSEG = DEF_SETUPSEG /* setup starts here */ SETUPSEG = DEF_SETUPSEG /* setup starts here */
...@@ -46,8 +45,8 @@ SWAP_DEV = 0 /* SWAP_DEV is now written by "build" */ ...@@ -46,8 +45,8 @@ SWAP_DEV = 0 /* SWAP_DEV is now written by "build" */
#define RAMDISK 0 #define RAMDISK 0
#endif #endif
#ifndef CONFIG_ROOT_RDONLY #ifndef ROOT_RDONLY
#define CONFIG_ROOT_RDONLY 1 #define ROOT_RDONLY 1
#endif #endif
.code16 .code16
...@@ -394,11 +393,11 @@ disksizes: .byte 36, 18, 15, 9 ...@@ -394,11 +393,11 @@ disksizes: .byte 36, 18, 15, 9
msg1: .byte 13, 10 msg1: .byte 13, 10
.ascii "Loading" .ascii "Loading"
# XXX: This is a *very* snug fit. # XXX: This is a fairly snug fit.
.org 497 .org 497
setup_sects: .byte SETUPSECS setup_sects: .byte SETUPSECTS
root_flags: .word CONFIG_ROOT_RDONLY root_flags: .word ROOT_RDONLY
syssize: .word SYSSIZE syssize: .word SYSSIZE
swap_dev: .word SWAP_DEV swap_dev: .word SWAP_DEV
ram_size: .word RAMDISK ram_size: .word RAMDISK
......
...@@ -133,7 +133,6 @@ CONFIG_BLK_DEV_FD=y ...@@ -133,7 +133,6 @@ CONFIG_BLK_DEV_FD=y
# CONFIG_MD_RAID1 is not set # CONFIG_MD_RAID1 is not set
# CONFIG_MD_RAID5 is not set # CONFIG_MD_RAID5 is not set
# CONFIG_BLK_DEV_LVM is not set # CONFIG_BLK_DEV_LVM is not set
# CONFIG_LVM_PROC_FS is not set
# #
# Networking options # Networking options
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
* 'Traps.c' handles hardware traps and faults after we have saved some * 'Traps.c' handles hardware traps and faults after we have saved some
* state in 'entry.S'. * state in 'entry.S'.
*/ */
#include <linux/config.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/string.h> #include <linux/string.h>
......
...@@ -937,12 +937,14 @@ int do_coredump(long signr, struct pt_regs * regs) ...@@ -937,12 +937,14 @@ int do_coredump(long signr, struct pt_regs * regs)
#else #else
corename[4] = '\0'; corename[4] = '\0';
#endif #endif
file = filp_open(corename, O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600); file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);
if (IS_ERR(file)) if (IS_ERR(file))
goto fail; goto fail;
inode = file->f_dentry->d_inode; inode = file->f_dentry->d_inode;
if (inode->i_nlink > 1) if (inode->i_nlink > 1)
goto close_fail; /* multiple links - don't dump */ goto close_fail; /* multiple links - don't dump */
if (d_unhashed(file->f_dentry))
goto close_fail;
if (!S_ISREG(inode->i_mode)) if (!S_ISREG(inode->i_mode))
goto close_fail; goto close_fail;
...@@ -950,6 +952,8 @@ int do_coredump(long signr, struct pt_regs * regs) ...@@ -950,6 +952,8 @@ int do_coredump(long signr, struct pt_regs * regs)
goto close_fail; goto close_fail;
if (!file->f_op->write) if (!file->f_op->write)
goto close_fail; goto close_fail;
if (do_truncate(file->f_dentry, 0) != 0)
goto close_fail;
if (!binfmt->core_dump(signr, regs, file)) if (!binfmt->core_dump(signr, regs, file))
goto close_fail; goto close_fail;
unlock_kernel(); unlock_kernel();
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
#define _LVM_KERNEL_H_VERSION "LVM 0.9.1_beta2 (18/01/2001)" #define _LVM_KERNEL_H_VERSION "LVM 0.9.1_beta2 (18/01/2001)"
#include <linux/config.h>
#include <linux/version.h> #include <linux/version.h>
/* /*
......
/* Masquerade. Simple mapping which alters range to a local IP address /* Masquerade. Simple mapping which alters range to a local IP address
(depending on route). */ (depending on route). */
#include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/timer.h> #include <linux/timer.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment