NetBSD Problem Report #47435

From dholland@macaran.localdomain  Sat Jan 12 00:12:49 2013
Return-Path: <dholland@macaran.localdomain>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id DC18663C07C
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 12 Jan 2013 00:12:48 +0000 (UTC)
Message-Id: <20130112001341.67B286E239@macaran.localdomain>
Date: Fri, 11 Jan 2013 19:13:41 -0500 (EST)
From: dholland@eecs.harvard.edu
Reply-To: dholland@eecs.harvard.edu
To: gnats-bugs@gnats.NetBSD.org
Subject: wd_trim doesn't check bounds
X-Send-Pr-Version: 3.95

>Number:         47435
>Category:       kern
>Synopsis:       wd_trim doesn't check bounds
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 12 00:15:00 +0000 2013
>Last-Modified:  Tue Sep 08 09:10:00 +0000 2015
>Originator:     David A. Holland
>Release:        NetBSD 6.99.16 (20130108)
>Organization:
>Environment:
System: NetBSD amberdon 6.99.16 NetBSD 6.99.16 (AMBERDON) #7: Tue Jan  8 17:14:49 EST 2013  root@amberdon:/usr/src/sys/arch/amd64/compile/AMBERDON amd64
Architecture: x86_64
Machine: amd64
>Description:

wd_trim() adds in the partition offset, if you do it on other than
RAW_PART, but it does not check that you aren't running off the end of
the partition into another.

>How-To-Repeat:

code reading.

>Fix:

Straightforward.

(Also, I have my doubts as to whether DIOCGDISCARDPARAMS and
DIOCDISCARD is the API we want to provide in the long term. This is
not the right place to discuss that though.)

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/47435: wd_trim doesn't check bounds
Date: Tue, 8 Sep 2015 09:08:47 +0000

 update:

 On Sat, Jan 12, 2013 at 12:15:01AM +0000, dholland@eecs.harvard.edu wrote:
  > wd_trim() adds in the partition offset, if you do it on other than
  > RAW_PART, but it does not check that you aren't running off the end of
  > the partition into another.

 This is still true, as far as I know.

  > (Also, I have my doubts as to whether DIOCGDISCARDPARAMS and
  > DIOCDISCARD is the API we want to provide in the long term. This is
  > not the right place to discuss that though.)

 This API got replaced and this part is no longer an issue.

 -- 
 David A. Holland
 dholland@netbsd.org

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.