Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/opencrypto Don't disclose uninitialized 32-bit word if c...
details: https://anonhg.NetBSD.org/src/rev/9deadf6364cf
branches: trunk
changeset: 355390:9deadf6364cf
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Jul 28 14:13:56 2017 +0000
description:
Don't disclose uninitialized 32-bit word if cryptodev_session fails.
>From Ilja Van Sprundel.
diffstat:
sys/opencrypto/ocryptodev.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 695475de282c -r 9deadf6364cf sys/opencrypto/ocryptodev.c
--- a/sys/opencrypto/ocryptodev.c Fri Jul 28 14:13:13 2017 +0000
+++ b/sys/opencrypto/ocryptodev.c Fri Jul 28 14:13:56 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ocryptodev.c,v 1.8 2017/06/02 09:46:57 knakahara Exp $ */
+/* $NetBSD: ocryptodev.c,v 1.9 2017/07/28 14:13:56 riastradh Exp $ */
/* $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $ */
/* $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $ */
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ocryptodev.c,v 1.8 2017/06/02 09:46:57 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ocryptodev.c,v 1.9 2017/07/28 14:13:56 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -245,8 +245,10 @@
sop.mackeylen = osop->mackeylen;
sop.mackey = osop->mackey;
res = cryptodev_session(fcr, &sop);
+ if (res)
+ return res;
osop->ses = sop.ses;
- return res;
+ return 0;
}
Home |
Main Index |
Thread Index |
Old Index