Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107308602
D31170.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
812 B
Referenced Files
None
Subscribers
None
D31170.diff
View Options
diff --git a/sys/geom/eli/g_eli_integrity.c b/sys/geom/eli/g_eli_integrity.c
--- a/sys/geom/eli/g_eli_integrity.c
+++ b/sys/geom/eli/g_eli_integrity.c
@@ -515,6 +515,17 @@
if (bp->bio_cmd == BIO_WRITE)
memset(data + sc->sc_alen + data_secsize, 0,
encr_secsize - sc->sc_alen - data_secsize);
+ } else if (data_secsize + sc->sc_alen != encr_secsize) {
+ /*
+ * If the HMAC size is not a multiple of 128 bits, the
+ * per-sector data size is rounded down to ensure that
+ * encryption can be performed without requiring any
+ * padding. In this case, each sector contains unused
+ * bytes.
+ */
+ 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_WRITE) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 13, 7:48 AM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15779379
Default Alt Text
D31170.diff (812 B)
Attached To
Mode
D31170: eli: Zero pad bytes that arise when certain auth algos are used
Attached
Detach File
Event Timeline
Log In to Comment