Page MenuHomeFreeBSD

D12272.1795510640.diff
No OneTemporary

Authored By
Unknown
Size
718 B
Referenced Files
None
Subscribers
None

D12272.1795510640.diff

Index: head/sys/geom/eli/g_eli_integrity.c
===================================================================
--- head/sys/geom/eli/g_eli_integrity.c
+++ head/sys/geom/eli/g_eli_integrity.c
@@ -463,8 +463,16 @@
authkey = (u_char *)p; p += G_ELI_AUTH_SECKEYLEN;
data_secsize = sc->sc_data_per_sector;
- if ((i % lsec) == 0)
+ if ((i % lsec) == 0) {
data_secsize = decr_secsize % data_secsize;
+ /*
+ * Last encrypted sector of each decrypted sector is
+ * only partially filled.
+ */
+ if (bp->bio_cmd == BIO_WRITE)
+ memset(data + sc->sc_alen + data_secsize, 0,
+ encr_secsize - sc->sc_alen - data_secsize);
+ }
if (bp->bio_cmd == BIO_READ) {
/* Remember read HMAC. */

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 24, 8:57 AM (11 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41951254
Default Alt Text
D12272.1795510640.diff (718 B)

Event Timeline