Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2018 01:51:50 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 227605] [OCF] encrypt_multi/decrypt_multi process too many data
Message-ID:  <bug-227605-227-XaOpNrl1N0@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-227605-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-227605-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227605

--- Comment #1 from Conrad Meyer <cem@freebsd.org> ---
Nice find.  It seems like this can only happen if passed an mbuf chain or u=
io
longer than crd_len.  Does using the API like this actually make sense?

We could maybe add an assertion that buffer input sizes matches crd_len (+
crd_skip).

In the case of esp_input(), it seems like m_split() could be used to separa=
te
the authentication portion from the encrypted contents before passing to
crypto_dispatch().

OTOH, your patch looks totally correct.  I would additionally cast i to siz=
e_t
to avoid ambiguity in comparison signedness in min() macro.

--=20
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-227605-227-XaOpNrl1N0>