From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Gilad Ben-Yossef <gilad@benyossef.com>,
Steffen Klassert <steffen.klassert@secunet.com>,
Sasha Levin <alexander.levin@verizon.com>
Subject: [PATCH 4.4 20/56] IPsec: do not ignore crypto err in ah4 input
Date: Mon, 13 Nov 2017 13:55:44 +0100 [thread overview]
Message-ID: <20171113125600.166818338@linuxfoundation.org> (raw)
In-Reply-To: <20171113125557.613444087@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gilad Ben-Yossef <gilad@benyossef.com>
[ Upstream commit ebd89a2d0675f1325c2be5b7576fd8cb7e8defd0 ]
ah4 input processing uses the asynchronous hash crypto API which
supplies an error code as part of the operation completion but
the error code was being ignored.
Treat a crypto API error indication as a verification failure.
While a crypto API reported error would almost certainly result
in a memcpy of the digest failing anyway and thus the security
risk seems minor, performing a memory compare on what might be
uninitialized memory is wrong.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/ah4.c | 3 +++
1 file changed, 3 insertions(+)
--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -270,6 +270,9 @@ static void ah_input_done(struct crypto_
int ihl = ip_hdrlen(skb);
int ah_hlen = (ah->hdrlen + 2) << 2;
+ if (err)
+ goto out;
+
work_iph = AH_SKB_CB(skb)->tmp;
auth_data = ah_tmp_auth(work_iph, ihl);
icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len);
next prev parent reply other threads:[~2017-11-13 12:58 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 12:55 [PATCH 4.4 00/56] 4.4.98-stable review Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 02/56] video: fbdev: pmag-ba-fb: Remove bad `__init annotation Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 03/56] PCI: mvebu: Handle changes to the bridge windows while enabled Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 04/56] xen/netback: set default upper limit of tx/rx queues to 8 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 05/56] ARM: dts: imx53-qsb-common: fix FEC pinmux config Greg Kroah-Hartman
2017-11-14 15:44 ` Ben Hutchings
2017-11-15 4:03 ` Patrick Brünn
2017-11-15 15:15 ` Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 06/56] dt-bindings: clockgen: Add compatible string for LS1012A Greg Kroah-Hartman
2017-11-14 15:46 ` Ben Hutchings
2017-11-15 15:16 ` Greg Kroah-Hartman
2017-11-15 15:19 ` Ben Hutchings
2017-11-15 15:51 ` Greg Kroah-Hartman
2017-11-15 15:25 ` Bhaskar Upadhaya
2017-11-15 15:52 ` Greg Kroah-Hartman
2017-11-15 15:55 ` Harninder Rai
2017-11-15 16:08 ` Greg Kroah-Hartman
2017-11-15 16:22 ` Harninder Rai
2017-11-17 5:57 ` Harninder Rai
2017-11-17 7:55 ` Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 08/56] KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 09/56] iommu/arm-smmu-v3: Clear prior settings when updating STEs Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 10/56] powerpc/corenet: explicitly disable the SDHC controller on kmcoge4 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 11/56] ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 12/56] crypto: vmx - disable preemption to enable vsx in aes_ctr.c Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 13/56] iio: trigger: free trigger resource correctly Greg Kroah-Hartman
2017-11-14 20:14 ` Ben Hutchings
2017-11-15 16:11 ` Greg Kroah-Hartman
2017-11-18 15:04 ` Jonathan Cameron
2017-11-13 12:55 ` [PATCH 4.4 14/56] dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification Greg Kroah-Hartman
2017-11-14 20:15 ` Ben Hutchings
2017-11-15 15:08 ` Greg Kroah-Hartman
2017-11-15 15:14 ` Ben Hutchings
2017-11-15 15:50 ` Greg Kroah-Hartman
2017-11-15 16:29 ` alexander.levin
2017-11-13 12:55 ` [PATCH 4.4 15/56] dt-bindings: Add vendor prefix for LEGO Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 17/56] serial: sh-sci: Fix register offsets for the IRDA serial port Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 18/56] usb: hcd: initialize hcd->flags to 0 when rm hcd Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 19/56] netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family Greg Kroah-Hartman
2017-11-13 12:55 ` Greg Kroah-Hartman [this message]
2017-11-13 12:55 ` [PATCH 4.4 21/56] Input: mpr121 - handle multiple bits change of status register Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 22/56] Input: mpr121 - set missing event capability Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 23/56] IB/ipoib: Change list_del to list_del_init in the tx object Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 24/56] s390/qeth: issue STARTLAN as first IPA command Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 25/56] net: dsa: select NET_SWITCHDEV Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 28/56] KEYS: trusted: sanitize all key material Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 29/56] KEYS: trusted: fix writing past end of buffer in trusted_read() Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 32/56] x86/uaccess, sched/preempt: Verify access_ok() context Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 33/56] workqueue: Fix NULL pointer dereference Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 34/56] crypto: x86/sha1-mb - fix panic due to unaligned access Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.4 35/56] KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2] Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 36/56] ARM: 8720/1: ensure dump_instr() checks addr_limit Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 37/56] ALSA: seq: Fix OSS sysex delivery in OSS emulation Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 38/56] ALSA: seq: Avoid invalid lockdep class warning Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 39/56] MIPS: microMIPS: Fix incorrect mask in insn_table_MM Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 40/56] MIPS: Fix CM region target definitions Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 41/56] MIPS: SMP: Use a completion event to signal CPU up Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 42/56] MIPS: Fix race on setting and getting cpu_online_mask Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 43/56] MIPS: SMP: Fix deadlock & online race Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 44/56] test: firmware_class: report errors properly on failure Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 45/56] selftests: firmware: add empty string and async tests Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 46/56] selftests: firmware: send expected errors to /dev/null Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 47/56] tools: firmware: check for distro fallback udev cancel rule Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 48/56] MIPS: AR7: Defer registration of GPIO Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 49/56] MIPS: AR7: Ensure that serial ports are properly set up Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 50/56] Input: elan_i2c - add ELAN060C to the ACPI table Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 51/56] drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 52/56] rbd: use GFP_NOIO for parent stat and data requests Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 53/56] can: sun4i: handle overrun in RX FIFO Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 55/56] x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.4 56/56] PKCS#7: fix unitialized boolean want Greg Kroah-Hartman
2017-11-13 21:51 ` [PATCH 4.4 00/56] 4.4.98-stable review Shuah Khan
2017-11-13 22:28 ` Guenter Roeck
2017-11-14 21:31 ` Tom Gall
2017-11-15 8:59 ` Greg Kroah-Hartman
2017-11-15 10:14 ` Milosz Wasilewski
2017-11-15 12:15 ` Naresh Kamboju
2017-11-15 15:17 ` Greg Kroah-Hartman
2017-11-15 16:22 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171113125600.166818338@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=alexander.levin@verizon.com \
--cc=gilad@benyossef.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).