Patches des Kernels 2.6.10 schlägt teilweise fehl.

FreeBSD, Gentoo, openSUSE, CentOS, Ubuntu, Debian
blnsnoopy26
Posts: 660
Joined: 2002-10-19 14:01

Patches des Kernels 2.6.10 schlägt teilweise fehl.

Post by blnsnoopy26 » 2005-02-05 11:15

Hi,

Also habe da folgendes Problem und vielleicht hat es janoch jemand mitbekommen und zwar habe ich mit die Kernel Sourcen 2.6.10 von Kernel.org gezogen und von der grsecurity Webseite den dazugehörigen Patch.

Alles soweit so gut ... für mich war das schon rutine, weil habe ich ja schon paar mal gemacht, also lege ich los.

Code: Select all

/usr/src/linux-2.6.10 # patch -p1 < grsecurity-2.1.1-2.6.10-as2-200501242254.patch
aber dann bekam ich teilweise fehlermeldungen im Patch und habe es mir mal in eine textdatei ausgeben lassen den ganzen vorgang:

Code: Select all

patching file Makefile
Hunk #1 FAILED at 1.
1 out of 2 hunks FAILED -- saving rejects to file Makefile.rej
patching file arch/alpha/kernel/osf_sys.c
patching file arch/alpha/kernel/ptrace.c
patching file arch/alpha/mm/fault.c
patching file arch/arm/mm/mmap.c
patching file arch/i386/Kconfig
patching file arch/i386/kernel/apm.c
patching file arch/i386/kernel/cpu/common.c
Hunk #3 succeeded at 361 (offset 2 lines).
Hunk #4 succeeded at 508 (offset 3 lines).
Hunk #5 succeeded at 530 (offset 3 lines).
Hunk #6 succeeded at 561 (offset 3 lines).
patching file arch/i386/kernel/entry.S
patching file arch/i386/kernel/head.S
patching file arch/i386/kernel/init_task.c
patching file arch/i386/kernel/ioport.c
patching file arch/i386/kernel/irq.c
patching file arch/i386/kernel/ldt.c
patching file arch/i386/kernel/process.c
patching file arch/i386/kernel/ptrace.c
patching file arch/i386/kernel/reboot.c
patching file arch/i386/kernel/setup.c
patching file arch/i386/kernel/signal.c
patching file arch/i386/kernel/sys_i386.c
patching file arch/i386/kernel/sysenter.c
patching file arch/i386/kernel/traps.c
patching file arch/i386/kernel/vm86.c
patching file arch/i386/kernel/vmlinux.lds.S
patching file arch/i386/mm/fault.c
patching file arch/i386/mm/init.c
patching file arch/i386/mm/mmap.c
patching file arch/i386/pci/pcbios.c
patching file arch/i386/power/cpu.c
patching file arch/ia64/ia32/binfmt_elf32.c
patching file arch/ia64/ia32/ia32priv.h
patching file arch/ia64/ia32/sys_ia32.c
patching file arch/ia64/kernel/ptrace.c
patching file arch/ia64/kernel/sys_ia64.c
patching file arch/ia64/mm/fault.c
patching file arch/mips/kernel/binfmt_elfn32.c
patching file arch/mips/kernel/binfmt_elfo32.c
patching file arch/mips/kernel/syscall.c
patching file arch/mips/mm/fault.c
patching file arch/parisc/kernel/ptrace.c
patching file arch/parisc/kernel/sys_parisc.c
patching file arch/parisc/kernel/traps.c
patching file arch/parisc/mm/fault.c
patching file arch/ppc/kernel/ptrace.c
patching file arch/ppc/kernel/syscalls.c
patching file arch/ppc/mm/fault.c
patching file arch/ppc64/kernel/syscalls.c
patching file arch/ppc64/mm/fault.c
patching file arch/sparc/Makefile
patching file arch/sparc/kernel/ptrace.c
patching file arch/sparc/kernel/sys_sparc.c
patching file arch/sparc/kernel/sys_sunos.c
patching file arch/sparc/mm/fault.c
patching file arch/sparc/mm/init.c
patching file arch/sparc/mm/srmmu.c
patching file arch/sparc64/kernel/ptrace.c
patching file arch/sparc64/kernel/sys_sparc.c
patching file arch/sparc64/kernel/sys_sunos32.c
patching file arch/sparc64/mm/fault.c
patching file arch/sparc64/solaris/misc.c
patching file arch/x86_64/ia32/ia32_binfmt.c
patching file arch/x86_64/ia32/sys_ia32.c
patching file arch/x86_64/kernel/ptrace.c
patching file arch/x86_64/kernel/sys_x86_64.c
patching file arch/x86_64/mm/fault.c
patching file drivers/char/keyboard.c
patching file drivers/char/mem.c
patching file drivers/char/random.c
patching file drivers/char/vt_ioctl.c
patching file drivers/pci/proc.c
patching file drivers/pnp/pnpbios/bioscalls.c
patching file drivers/video/vesafb.c
patching file fs/Kconfig
patching file fs/binfmt_aout.c
Hunk #2 succeeded at 123 (offset -3 lines).
Hunk #3 succeeded at 136 (offset -3 lines).
Hunk #4 succeeded at 291 (offset -3 lines).
Hunk #5 succeeded at 321 (offset -3 lines).
Hunk #6 succeeded at 436 (offset -10 lines).
patching file fs/binfmt_elf.c
Hunk #2 FAILED at 91.
Hunk #3 succeeded at 324 (offset -3 lines).
Hunk #4 succeeded at 361 (offset -3 lines).
Hunk #5 succeeded at 397 (offset -3 lines).
Hunk #6 succeeded at 488 (offset -10 lines).
Hunk #7 succeeded at 745 (offset -10 lines).
Hunk #8 succeeded at 973 (offset -10 lines).
Hunk #9 succeeded at 1103 (offset -10 lines).
Hunk #10 succeeded at 1201 (offset -10 lines).
Hunk #11 succeeded at 1216 (offset -10 lines).
Hunk #12 succeeded at 1245 (offset -10 lines).
Hunk #13 succeeded at 1486 (offset -13 lines).
Hunk #14 succeeded at 1543 (offset -13 lines).
1 out of 14 hunks FAILED -- saving rejects to file fs/binfmt_elf.c.rej
patching file fs/binfmt_flat.c
patching file fs/binfmt_misc.c
patching file fs/buffer.c
patching file fs/compat.c
patching file fs/dcache.c
patching file fs/exec.c
patching file fs/fcntl.c
patching file fs/namei.c
patching file fs/namespace.c
patching file fs/open.c
patching file fs/proc/array.c
patching file fs/proc/base.c
patching file fs/proc/inode.c
patching file fs/proc/proc_misc.c
patching file fs/proc/root.c
patching file fs/proc/task_mmu.c
patching file fs/readdir.c
patching file fs/xfs/linux-2.6/xfs_file.c
patching file grsecurity/Kconfig
patching file grsecurity/Makefile
patching file grsecurity/gracl.c
patching file grsecurity/gracl_alloc.c
patching file grsecurity/gracl_cap.c
patching file grsecurity/gracl_fs.c
patching file grsecurity/gracl_ip.c
patching file grsecurity/gracl_learn.c
patching file grsecurity/gracl_res.c
patching file grsecurity/gracl_segv.c
patching file grsecurity/gracl_shm.c
patching file grsecurity/grsec_chdir.c
patching file grsecurity/grsec_chroot.c
patching file grsecurity/grsec_disabled.c
patching file grsecurity/grsec_exec.c
patching file grsecurity/grsec_fifo.c
patching file grsecurity/grsec_fork.c
patching file grsecurity/grsec_init.c
patching file grsecurity/grsec_ipc.c
patching file grsecurity/grsec_link.c
patching file grsecurity/grsec_log.c
patching file grsecurity/grsec_mem.c
patching file grsecurity/grsec_mount.c
patching file grsecurity/grsec_rand.c
patching file grsecurity/grsec_sig.c
patching file grsecurity/grsec_sock.c
patching file grsecurity/grsec_sysctl.c
patching file grsecurity/grsec_textrel.c
patching file grsecurity/grsec_time.c
patching file grsecurity/grsec_tpe.c
patching file grsecurity/grsum.c
patching file grsecurity/obsd_rand.c
patching file include/asm-alpha/a.out.h
patching file include/asm-alpha/elf.h
patching file include/asm-alpha/mman.h
patching file include/asm-alpha/page.h
patching file include/asm-alpha/pgtable.h
patching file include/asm-arm/a.out.h
patching file include/asm-arm/elf.h
patching file include/asm-i386/a.out.h
patching file include/asm-i386/desc.h
patching file include/asm-i386/elf.h
patching file include/asm-i386/mach-default/apm.h
patching file include/asm-i386/mman.h
patching file include/asm-i386/mmu.h
patching file include/asm-i386/mmu_context.h
patching file include/asm-i386/module.h
patching file include/asm-i386/page.h
patching file include/asm-i386/pgalloc.h
patching file include/asm-i386/pgtable-3level.h
patching file include/asm-i386/pgtable.h
patching file include/asm-i386/processor.h
Hunk #4 succeeded at 295 (offset -2 lines).
Hunk #5 succeeded at 516 (offset -2 lines).
Hunk #6 succeeded at 645 (offset -2 lines).
Hunk #7 succeeded at 659 (offset -2 lines).
patching file include/asm-i386/system.h
patching file include/asm-ia64/elf.h
patching file include/asm-ia64/mman.h
patching file include/asm-ia64/page.h
patching file include/asm-ia64/pgtable.h
patching file include/asm-ia64/ustack.h
patching file include/asm-mips/a.out.h
patching file include/asm-mips/elf.h
patching file include/asm-mips/page.h
patching file include/asm-parisc/a.out.h
patching file include/asm-parisc/elf.h
patching file include/asm-parisc/mman.h
patching file include/asm-parisc/page.h
patching file include/asm-parisc/pgtable.h
patching file include/asm-ppc/a.out.h
patching file include/asm-ppc/elf.h
patching file include/asm-ppc/mman.h
patching file include/asm-ppc/page.h
patching file include/asm-ppc/pgtable.h
patching file include/asm-ppc64/a.out.h
patching file include/asm-ppc64/elf.h
patching file include/asm-ppc64/mman.h
patching file include/asm-ppc64/page.h
patching file include/asm-ppc64/pgtable.h
patching file include/asm-sparc/a.out.h
patching file include/asm-sparc/elf.h
patching file include/asm-sparc/mman.h
patching file include/asm-sparc/page.h
patching file include/asm-sparc/pgtable.h
patching file include/asm-sparc/pgtsrmmu.h
patching file include/asm-sparc/uaccess.h
patching file include/asm-sparc64/a.out.h
patching file include/asm-sparc64/elf.h
patching file include/asm-sparc64/mman.h
patching file include/asm-sparc64/page.h
patching file include/asm-x86_64/a.out.h
patching file include/asm-x86_64/elf.h
patching file include/asm-x86_64/mman.h
patching file include/asm-x86_64/page.h
patching file include/asm-x86_64/pgalloc.h
patching file include/asm-x86_64/pgtable.h
patching file include/linux/a.out.h
patching file include/linux/binfmts.h
patching file include/linux/elf.h
patching file include/linux/fs.h
patching file include/linux/gracl.h
patching file include/linux/gralloc.h
patching file include/linux/grdefs.h
patching file include/linux/grinternal.h
patching file include/linux/grmsg.h
patching file include/linux/grsecurity.h
patching file include/linux/mm.h
patching file include/linux/mman.h
patching file include/linux/random.h
patching file include/linux/sched.h
patching file include/linux/shm.h
patching file include/linux/sysctl.h
patching file include/net/ip.h
patching file init/Kconfig
patching file init/main.c
patching file ipc/msg.c
patching file ipc/sem.c
patching file ipc/shm.c
patching file kernel/capability.c
patching file kernel/configs.c
patching file kernel/exit.c
patching file kernel/fork.c
patching file kernel/futex.c
patching file kernel/kallsyms.c
patching file kernel/pid.c
patching file kernel/printk.c
patching file kernel/resource.c
patching file kernel/sched.c
patching file kernel/signal.c
patching file kernel/sys.c
patching file kernel/sysctl.c
patching file kernel/time.c
patching file kernel/timer.c
patching file mm/filemap.c
patching file mm/madvise.c
patching file mm/memory.c
patching file mm/mlock.c
patching file mm/mmap.c
Hunk #19 FAILED at 1478.
Hunk #20 FAILED at 1584.
Hunk #21 succeeded at 1701 (offset -31 lines).
Hunk #22 succeeded at 1758 (offset -31 lines).
Hunk #23 succeeded at 1886 (offset -31 lines).
Hunk #24 succeeded at 1922 (offset -31 lines).
Hunk #25 succeeded at 1944 (offset -31 lines).
Hunk #26 succeeded at 1966 (offset -31 lines).
Hunk #27 succeeded at 1974 (offset -31 lines).
Hunk #28 succeeded at 1988 (offset -31 lines).
Hunk #29 succeeded at 2005 (offset -31 lines).
Hunk #30 succeeded at 2041 (offset -31 lines).
Hunk #31 succeeded at 2059 (offset -31 lines).
Hunk #32 succeeded at 2067 (offset -37 lines).
Hunk #33 succeeded at 2089 (offset -37 lines).
Hunk #34 succeeded at 2121 (offset -37 lines).
Hunk #35 succeeded at 2136 (offset -37 lines).
2 out of 35 hunks FAILED -- saving rejects to file mm/mmap.c.rej
patching file mm/mprotect.c
patching file mm/mremap.c
patching file mm/rmap.c
patching file net/ipv4/af_inet.c
patching file net/ipv4/datagram.c
patching file net/ipv4/ip_output.c
patching file net/ipv4/netfilter/Kconfig
patching file net/ipv4/netfilter/Makefile
patching file net/ipv4/netfilter/ipt_stealth.c
patching file net/ipv4/tcp_ipv4.c
patching file net/ipv4/udp.c
patching file net/socket.c
patching file net/sunrpc/xprt.c
patching file net/unix/af_unix.c
patching file security/Kconfig
patching file security/commoncap.c
patching file security/dummy.c
Hunk #2 FAILED at 187.
1 out of 2 hunks FAILED -- saving rejects to file security/dummy.c.rej
patching file security/security.c
Zu beachten sind die ganzen Failed anzeigen beim Patchen.
Ich schätze, das der Patch nicht einbahnfrei ist und nicht richtig an die neuen 2.6.10 Kernel Sourcen angepasst ist.

Oder habe ich da irgendwo was übersehn, was mir da noch nicht aufgefallen ist?

Weil wollte ersst einmal hier fragen, weil so mit den Fehlern kann ich ja schlecht anfangen zu kompilieren.

oxygen
RSAC
Posts: 2179
Joined: 2002-12-15 00:10
Location: Bergheim

Re: Patches des Kernels 2.6.10 schlägt teilweise fehl.

Post by oxygen » 2005-02-05 11:43

der patch ist für 2.6.10-as2, nicht für den Vanilla 2.6.10.

blnsnoopy26
Posts: 660
Joined: 2002-10-19 14:01

Re: Patches des Kernels 2.6.10 schlägt teilweise fehl.

Post by blnsnoopy26 » 2005-02-05 12:20

Hmm,... hab mir sowas schon gedacht, aber auf kernel.org finde ich den nicht. Weiss da jemand wo ich den herbekomme?

Per google habe ich schon gesucht und nix gescheites gefunden und wenn es geht wollte ich nur von offiziellen Webseiten den Kernel dann downloaden.

oxygen
RSAC
Posts: 2179
Joined: 2002-12-15 00:10
Location: Bergheim

Re: Patches des Kernels 2.6.10 schlägt teilweise fehl.

Post by oxygen » 2005-02-05 12:31

Steht ganz oben auf der grsecurity Website.
http://www.grsecurity.org/news.php#grsec211 wrote:[01/24] grsecurity 2.1.1 released for Linux 2.4.29/2.6.10-as2

Grsecurity 2.1.1 has been released for the 2.4.29 kernel as well as the 2.6.10-as2 tree (a tree made specifically for security patches and trivial bugfixes). Changes in this release include longer buffers for exec args in exec auditing, rewriting of unprintable characters in exec auditing, automatic tty sniffing detection in the RBAC system at authentication time, fixed hidden file detection, fixed gradm crashes when parsing certain learning logs, updated learning heuristics, and most heuristics have been placed in /etc/grsec/learn_config and are now fully configurable. If you installed gradm 2.1.0 and modified /etc/grsec/learn_config, you will want to replace your copy with the new copy in gradm 2.1.1. The 2.6.10-as2 patch can be downloaded from http://www.acm.cs.rpi.edu/~dilinger/patches/2.6.10/as2/. The grsecurity 2.1.1 patch is to be applied *after* the 2.6.10-as2 patch.

blnsnoopy26
Posts: 660
Joined: 2002-10-19 14:01

Re: Patches des Kernels 2.6.10 schlägt teilweise fehl.

Post by blnsnoopy26 » 2005-02-05 13:27

Hi,

Ok dann wahr ich wohl blind gewesen.
Aber seh grad da sind ein haufen patches in dem archiv drin.
Da habe ich erst einmal zu tun die ganzen Patchfiles auszuführen.

Den Link habe ich da auf der Seite nämlich nicht gesehn, weil das mit der Linkvorhebung bischen doof gemacht ist, aber danke für das nachsehen. :) :roll: