From nobody Mon Mar 21 13:05:35 2022 X-Original-To: freebsd-security@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4386F1A35298 for ; Mon, 21 Mar 2022 13:05:44 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KMZc73msqz4Sh5 for ; Mon, 21 Mar 2022 13:05:43 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: by mail-io1-xd36.google.com with SMTP id r2so16578237iod.9 for ; Mon, 21 Mar 2022 06:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=net; h=subject:mime-version:disposition-notification-to:from:in-reply-to :date:cc:content-transfer-encoding:message-id:references:to; bh=1lZ3Y/xy0bPIP3KunE5opWnzaW8ea4wppl8unRQox1c=; b=W8vLp4hqWNWEJrcA+AtfN41ngS/fqulkBuK7hgZlz1gyPorItfI0F9tYgrPZ4GLcXk O0dpG0xxhufPlacZSxhGcnvHfKhs6Px46j+yYVo3QVGdXY7gFAQPQSczhIG3h99GJkt3 6HyG8yvCeHIRA8KJOSjCc9cTTtVsUfkWr9fM0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:mime-version:disposition-notification-to :from:in-reply-to:date:cc:content-transfer-encoding:message-id :references:to; bh=1lZ3Y/xy0bPIP3KunE5opWnzaW8ea4wppl8unRQox1c=; b=lwUfkZjdNgKcbv3pm9sQT0OaHyhKj3zlFtZpYBSJLpDBMmAtVmewc0TENY+lhxxGk5 4I3418TYCIxFvXrx5exXwBGOzj/5v0S2PZTRGlLKOqVrPA7zGk4bEvjbdGtrfeK3GBQl KXT63lu8zGaZnrUPbkpFPALAGJZTHIR0Sz5dDVKCVD8sKd1yXA1ZEqL7ESAYbu7hvVqO BU8I96sTAIAwPFZv1EehvxkouHn8vJHetpVKjVBfLMlrLbfmTuCyvYHrHNAMvkYVixJU 43ormYauyH3zzYKZxoWb95mhcIhy4WAvRe0Jx9QTIL8moDfu542QQhhmAdIGOvSKiTKe CDxA== X-Gm-Message-State: AOAM533avQwPQoQyufHlZY+H7onUBFc6njrK6x5Qi6EUwqk7LWFhR5M4 xzOF21nJyIRevbPjVsGLC+OClQg8+y32TQ== X-Google-Smtp-Source: ABdhPJyQdU5JlUj1DgPQds2mZG/vNE8iNr3Zsk0s0KemaSMesfsi/Jw/J3Y5pOay1gNPcCFvbMVXTA== X-Received: by 2002:a05:6638:1453:b0:319:c928:5ccd with SMTP id l19-20020a056638145300b00319c9285ccdmr11221620jad.136.1647867937068; Mon, 21 Mar 2022 06:05:37 -0700 (PDT) Received: from smtpclient.apple (2603-6000-ca01-b73e-78c8-90fe-0265-114e.res6.spectrum.com. [2603:6000:ca01:b73e:78c8:90fe:265:114e]) by smtp.gmail.com with ESMTPSA id r4-20020a92cd84000000b002c83a11e471sm258218ilb.67.2022.03.21.06.05.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Mar 2022 06:05:36 -0700 (PDT) Subject: Re: SSD erase question List-Id: Security issues List-Archive: https://lists.freebsd.org/archives/freebsd-security List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-security@freebsd.org X-BeenThere: freebsd-security@freebsd.org Mime-Version: REDACTED Content-Type: text/plain; charset=utf-8 Disposition-Notification-To: J. Hellenthal From: "J. Hellenthal" X-Mailer: REDACTED In-Reply-To: Date: Mon, 21 Mar 2022 08:05:35 -0500 Cc: freebsd-security@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <274c8cca-80b0-9460-6754-6bb77efbb4dd@htwsaar.de> To: Damian Weber X-Rspamd-Queue-Id: 4KMZc73msqz4Sh5 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dataix.net header.s=net header.b=W8vLp4hq; dmarc=pass (policy=reject) header.from=dataix.net; spf=pass (mx1.freebsd.org: domain of jhellenthal@dataix.net designates 2607:f8b0:4864:20::d36 as permitted sender) smtp.mailfrom=jhellenthal@dataix.net X-Spamd-Result: default: False [-1.71 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[dataix.net:s=net]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-security@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.78)[0.780]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[dataix.net:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[dataix.net,reject]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d36:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-security]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Think I've mistaken dc3dd for bcwipe from ports. See bcwipe instead... = https://www.jetico.com/news/jetico-delivers-new-bcwipe-solution-wipe-drive= s-supporting-mac-nvme-secure-boot --=20 J. Hellenthal The fact that there's a highway to Hell but only a stairway to Heaven = says a lot about anticipated traffic volume. > On Mar 21, 2022, at 07:52, J. Hellenthal = wrote: >=20 > Personally I would use dc3dd from ports and you'll be plenty alright. >=20 > While dd would be enough in most occasions I won't assume your data is = of a typical user. It only writes the random bits to the disk once. In = some scenarios it's possible to reverse that. dc3dd takes care of that = by writing multiple times. >=20 > There is also dcfldd which was superseded by dc3dd. >=20 > --=20 > J. Hellenthal >=20 > The fact that there's a highway to Hell but only a stairway to Heaven = says a lot about anticipated traffic volume. >=20 >> On Mar 21, 2022, at 07:15, Damian Weber wrote: >>=20 >> =EF=BB=BF >> Hi all, >>=20 >> I'd like to have an answer on a secure FreeBSD way to erase=20 >> SSDs before giving these away to someone for reusing it.=20 >>=20 >> Is the following enough to protect confidential data=20 >> previously stored there? >>=20 >> 1) dd : overwriting with random bits (complete capacity) >> 2) gpart create >> 3) gpart add >> 4) newfs >>=20 >> Details for an example with /dev/ada1 see below. >>=20 >> Thanks a lot, >>=20 >> Damian >>=20 >>=20 >> # fdisk ada1 >> ******* Working on device /dev/ada1 ******* >> parameters extracted from in-core disklabel are: >> cylinders=3D484521 heads=3D16 sectors/track=3D63 (1008 blks/cyl) >>=20 >> Figures below won't work with BIOS for partitions not in cyl 1 >> parameters to be used for BIOS calculations are: >> cylinders=3D484521 heads=3D16 sectors/track=3D63 (1008 blks/cyl) >>=20 >> Media sector size is 512 >> Warning: BIOS sector numbering starts with sector 1 >> Information from DOS bootblock is: >> The data for partition 1 is: >> sysid 238 (0xee),(EFI GPT) >> start 1, size 488397167 (238475 Meg), flag 0 >> beg: cyl 0/ head 0/ sector 2; >> end: cyl 1023/ head 255/ sector 63 >> The data for partition 2 is: >> >> The data for partition 3 is: >> >> The data for partition 4 is: >> >>=20 >> # gpart show ada1 >> =3D> 40 488397088 ada1 GPT (233G) >> 40 1024 1 freebsd-boot (512K) >> 1064 480246784 2 freebsd-ufs [bootme] (229G) >> 480247848 8149280 3 freebsd-swap (3.9G) >>=20 >> # dd if=3D/dev/random of=3D/dev/ada1 bs=3D512 count=3D488397088 >>=20 >> # gpart create -s gpt ada1 >>=20 >> # gpart add -t freebsd-ufs ada1 >>=20 >> # newfs -U /dev/ada1p1 >>=20 >>=20