RE: latest ptrace hole patch?

From: Jeremy Gaddis (jeremy@gaddis.org)
Date: 03/25/03

  • Next message: Kelly Sauke: "Live Upgrade for Linux"
    From: "Jeremy Gaddis" <jeremy@gaddis.org>
    To: <focus-linux@securityfocus.com>
    Date: Mon, 24 Mar 2003 20:15:45 -0500
    
    

    > -----Original Message-----
    > From: SB CH [mailto:chulmin2@hotmail.com]
    > Sent: Thursday, March 20, 2003 9:32 PM
    > To: focus-linux@securityfocus.com
    > Cc: ch@debian.org
    > Subject: Re: latest ptrace hole patch?
    >
    > Hello, list.
    >
    > I downloaded hardlock patch too like below.
    > http://www.hardrock.org/kernel/2.4.20/linux-2.4.20-ptrace.patch
    >
    > But I can gain root privilege too against this patched kernel too.
    >
    > please test the exploit code which is at http://www.hack.co.za/

    I tested the exploited previously posted to bugtraq (km3.c) by
    anszom@v-lo.krakow.pl against a variety of Linux machines
    (Slackware 8.0, Red Hat Linux 7.0, multiple Debian 3.0) and
    each one was exploitable when using the stock kernels.

    I applied this same patch to two of my Debian 3.0 machines
    and recompiled their kernels. Neither appear vulnerable to
    this exploit now. With the patched kernels, running the
    above-mentioned exploit simply results in it repeatedly
    forking.

    Unpatched Red Hat Linux 7.0 with stock kernel:

    [jeremy@venus:pts/1:~/security]$ ./km3
    Linux kmod + ptrace local root exploit by <anszom@v-lo.krakow.pl>

    => Simple mode, executing /usr/bin/id > /dev/tty
    sizeof(shellcode)=95
    => Child process started.+ 27934
    uid=0(root) gid=0(root) groups=1002(jeremy)
    - 27934 ok!
    [jeremy@venus:pts/1:~/security]$

    Patched (using above patch) Debian Linux 3.0:

    [jeremy@MERCURY:pts/0:~/security]$ ./km3
    Linux kmod + ptrace local root exploit by <anszom@v-lo.krakow.pl>

    => Simple mode, executing /usr/bin/id > /dev/tty
    sizeof(shellcode)=95
    => Child process started..........
    => Child process started..........
    => Child process started..........
    => Child process started..........
    => Child process started..........
    => Child process started..........
    => Child process started..........
    => Child process started. (^C issued at this point)
    [jeremy@MERCURY:pts/0:~/security]$

    I didn't test any exploit available at www.hack.co.za as I
    wasn't able to connect to that webserver for an unknown reason.

    j.

    --
    Jeremy L. Gaddis   <jeremy@gaddis.org>   <http://www.gaddis.org>
    

  • Next message: Kelly Sauke: "Live Upgrade for Linux"

    Relevant Pages

    • Re: Intel X25E doesnt work with nv sata in current kernels
      ... Tejun did come up with a patch that makes this work, I haven't heard from him in a couple of days so I don't know if he considers it good enough to go in or not. ... according to this ticket it did work with older vendor kernels, ... &online, NULL); ...
      (Linux-Kernel)
    • [PATCH] [2.4.24-pre3] 2/5 EXT2/3 Updates
      ... # This patch format is intended for GNU patch command version 2.5 or higher. ... # The following is the BitKeeper ChangeSet Log ... # symlink detection code. ... Older kernels will see a symlink with non-zero ...
      (Linux-Kernel)
    • Re: Old -rt patches
      ... way and installed the -rt patch, which includes the -hrt patches, as far as I understand. ... Since I could not afford to change kernels with every new release, I decided to track the 2.6.20 branch. ... I'm not a kernel hacker, so I don't claim to understand the patches, but the comments sound like a few bugs are fixed here and there. ...
      (Linux-Kernel)
    • Re: Old -rt patches
      ... Since I could not afford to change kernels with every new release, ... At this point I'm using 2.6.20.7-rt8 (-rt8 was the last patch to the ... I see a lot of patches going into the -rt patch, ... I'm not saying that it's impossible for the bug to be in my app, ...
      (Linux-Kernel)
    • Re: 2.6.10-rc1-mm4 -1 EAGAIN after allocation failure was: Re: Kernel 2.6.9 Multiple Page Allocation
      ... > but I think it should apply to -mm kernels as well. ... > The following patch roughly restores parity there. ... Experience is directly proportional to the amount of braincells ruined. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)