<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — TLSv1.3 bad_record_mac alert]]></title>
		<link>https://www.wolfssl.com/forums/topic1611-tlsv13-badrecordmac-alert.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1611.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in TLSv1.3 bad_record_mac alert.]]></description>
		<lastBuildDate>Tue, 29 Sep 2020 17:06:46 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: TLSv1.3 bad_record_mac alert]]></title>
			<link>https://www.wolfssl.com/forums/post5478.html#p5478</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>Could a sporadic crytpo operation failure cause this behavior?</p></blockquote></div><p>Yes it could be, you mentioned using an Atmel chip, we have seen cases where if data is not specifically aligned offloading to hardware can lead to issues.</p><div class="quotebox"><blockquote><p>If the WolfSSL peer is only receiving corrupt messages, would that exonerate our WolfSSL peer from blame?</p></blockquote></div><p>If the messages are corrupted on arrival at the wolfSSL end then yes that would exonerate wolfSSL from being the culprit of the corruption.</p><div class="quotebox"><blockquote><p>Any tips on pinpointing the culprit?</p></blockquote></div><p>You mentioned this happens very frequently from $jobs network (50%) and very infrequently from a private network. Is it possible the IT department in $jobs network is monitoring, decrypting and re-encrypting information for the sake of protection proprietary/trade secrets?</p><p>Warm Regards,</p><p>K</p>]]></description>
			<author><![CDATA[null@example.com (Kaleb J. Himes)]]></author>
			<pubDate>Tue, 29 Sep 2020 17:06:46 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5478.html#p5478</guid>
		</item>
		<item>
			<title><![CDATA[TLSv1.3 bad_record_mac alert]]></title>
			<link>https://www.wolfssl.com/forums/post5474.html#p5474</link>
			<description><![CDATA[<p>We&#039;re using WolfSSL v4.4.0 with the Atmel port, and the WolfSSL peer is sending a bad_record_mac alert when trying to do TLSv1.3 with a <a href="http://www.haproxy.org/">HAProxy</a> 2.0.12 server.&nbsp; Our WolfSSL product is an embedded one which uses a Microchip (formerly Atmel) cryptographic hardware chip.</p><p>We see the alert when the WolfSSL peer downloads ~500KiB over HTTPS.&nbsp; The alert manifests itself in different ways:<br /></p><ul><li><p>When it occurs during connection establishment, we get a &quot;bad certificate&quot; error</p></li><li><p>During data transfer, we get a TCP connection reset as the peer side shuts down its end of the connection</p></li></ul><p>I have not confirmed, but I believe the WolfSSL peer is always the one failing to validate the MAC of a message and responding with an alert sent to the HAProxy peer.</p><p>The anomaly occurs pretty frequently when the WolfSSL peer is communicating from $job&#039;s network (nearly 50% of transfers fail to complete), but much less frequently when communicating via my home AT&amp;T fiber ISP (&lt;5% of transfers fail).&nbsp; The failure may occur at any point during the transfer.</p><p>Googling suggests several possible culprits:<br /></p><ul><li><p>One peer is using an old OpenSSL library with a known bug that causes this issue (disproven; HAProxy was built with OpenSSLv1.1.1)</p></li><li><p>The peer sending the bad message is using OpenSSL incorrectly in a multithreaded application (unlikely; HAProxy was designed as a multithreaded application)</p></li><li><p>TCP packet corruption (unlikely, as <a href="https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure">TCP checksumming</a> should rarely allow a bad packet to pass a checksum check)</p></li></ul><p>Questions:<br /></p><ol class="decimal"><li><p>Could a sporadic crytpo operation failure cause this behavior?</p></li><li><p>If the WolfSSL peer is only <em>receiving</em> corrupt messages, would that exonerate our WolfSSL peer from blame?</p></li><li><p>Any tips on pinpointing the culprit?</p></li></ol><p>Thanks in advance!</p>]]></description>
			<author><![CDATA[null@example.com (Scoobi_FreeBSD)]]></author>
			<pubDate>Fri, 25 Sep 2020 12:46:24 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5474.html#p5474</guid>
		</item>
	</channel>
</rss>
