⬢ DragonFlyBSD Kernel Audit
DF-2369 / fix.diff
← back to finding ↓ download raw
--- a/sys/crypto/rijndael/rijndael-api-fst.c
+++ b/sys/crypto/rijndael/rijndael-api-fst.c
@@ -176,6 +176,9 @@
 				iv[3][2] = (iv[3][2] << 1) | (iv[3][3] >> 7);
 				iv[3][3] = (iv[3][3] << 1) | ((outBuffer[k/8] >> (7-(k&7))) & 1);
 			}
+			/* CFB1: advance to the next block */
+			input += 16;
+			outBuffer += 16;
 		}
 		break;
 
@@ -347,6 +350,9 @@
 				iv[3][3] = (iv[3][3] << 1) | ((input[k/8] >> (7-(k&7))) & 1);
 				outBuffer[k/8] ^= (block[0] & 0x80) >> (k & 7);
 			}
+			/* CFB1: advance to the next block */
+			input += 16;
+			outBuffer += 16;
 		}
 		break;