Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2019 14:03:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 235108] GELI leaves streaks of zeros for every encrypted sector; suggestion to randomize
Message-ID:  <bug-235108-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235108

            Bug ID: 235108
           Summary: GELI leaves streaks of zeros for every encrypted
                    sector; suggestion to randomize
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: gnu
          Assignee: bugs@FreeBSD.org
          Reporter: vandervelde.ag@gmail.com

Hi!

Surprised by seeing streaks of zeros every 4k on my geli encrypted drive, I
realized they are zero-padded sectors (i.e. the 9th sector underlying every
encrypted 4K). I was wondering if it’d be a good idea to do this instead, in
order to not give away sector start/end information in the case where metadata
is destroyed:

[freebsd .../geom/eli]$ svn diff
Index: g_eli_integrity.c
===================================================================
--- g_eli_integrity.c   (revision 343023)
+++ g_eli_integrity.c   (working copy)
@@ -472,7 +472,7 @@
                         * only partially filled.
                         */
                        if (bp->bio_cmd == BIO_WRITE)
-                               memset(data + sc->sc_alen + data_secsize, 0,
+                               arc4random_buf(data + sc->sc_alen +
data_secsize,
                                    encr_secsize - sc->sc_alen - data_secsize);
                }

[freebsd .../geom/eli]$

Thanks!

— Arjan

-- 
You are receiving this mail because:
You are the assignee for the bug.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235108-227>