From owner-freebsd-bugs@FreeBSD.ORG Sat May 3 11:40:01 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB913880 for ; Sat, 3 May 2014 11:40:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A10971390 for ; Sat, 3 May 2014 11:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s43Be1rO098968 for ; Sat, 3 May 2014 11:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s43Be16p098967; Sat, 3 May 2014 11:40:01 GMT (envelope-from gnats) Resent-Date: Sat, 3 May 2014 11:40:01 GMT Resent-Message-Id: <201405031140.s43Be16p098967@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, Thomas Quinot Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6575573D for ; Sat, 3 May 2014 11:38:53 +0000 (UTC) Received: from melamine.cuivre.fr.eu.org (houdart.cuivre.fr.eu.org [81.57.40.110]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26BA21388 for ; Sat, 3 May 2014 11:38:52 +0000 (UTC) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id AED341951D; Sat, 3 May 2014 13:38:42 +0200 (CEST) Message-Id: <20140503113842.AED341951D@melamine.cuivre.fr.eu.org> Date: Sat, 3 May 2014 13:38:42 +0200 (CEST) From: Thomas Quinot To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: bin/189284: dd(1): may write junk if conv=sparse with obs < ibs X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Thomas Quinot List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 11:40:01 -0000 >Number: 189284 >Category: bin >Synopsis: dd(1): may write junk if conv=sparse with obs < ibs >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 03 11:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Thomas Quinot >Release: FreeBSD 9.2-STABLE amd64 >Organization: >Environment: System: FreeBSD melamine.cuivre.fr.eu.org 9.2-STABLE FreeBSD 9.2-STABLE #0 r256080: Sun Oct 6 15:33:30 CEST 2013 thomas@melamine.cuivre.fr.eu.org:/usr/obj/users/thomas/projects/FreeBSD/base/stable/9/sys/GENERIC amd64 >Description: When ibs is an integral multiple of ibs, and there is a sequence of obs consecutive zeroes at the end of the last input block, the last character written by dd may be some different (non-zero) byte from the input stream. >How-To-Repeat: $ perl -e 'print "ABCDEFGH\0\0\0\0\0\0\0\0"'|dd ibs=16 obs=8 conv=sparse of=toto 1+0 records in 2+0 records out 16 bytes transferred in 0.001373 secs (11653 bytes/sec) $ od -a toto 0000000 A B C D E F G H nul nul nul nul nul nul nul A 0000020 >Fix: >Release-Note: >Audit-Trail: >Unformatted: