From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B48BC10F11 for ; Sat, 13 Apr 2019 16:08:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E7042084D for ; Sat, 13 Apr 2019 16:08:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727148AbfDMQID (ORCPT ); Sat, 13 Apr 2019 12:08:03 -0400 Received: from cassarossa.samfundet.no ([193.35.52.29]:38605 "EHLO cassarossa.samfundet.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727091AbfDMQID (ORCPT ); Sat, 13 Apr 2019 12:08:03 -0400 X-Greylist: delayed 2003 seconds by postgrey-1.27 at vger.kernel.org; Sat, 13 Apr 2019 12:08:02 EDT Received: from pannekake.samfundet.no ([2001:67c:29f4::50]) by cassarossa.samfundet.no with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hFKfs-0007lD-0u for netdev@vger.kernel.org; Sat, 13 Apr 2019 17:34:36 +0200 Received: from sesse by pannekake.samfundet.no with local (Exim 4.92) (envelope-from ) id 1hFKfr-0009gN-N6 for netdev@vger.kernel.org; Sat, 13 Apr 2019 17:34:35 +0200 Date: Sat, 13 Apr 2019 17:34:35 +0200 From: "Steinar H. Gunderson" To: netdev@vger.kernel.org Subject: kTLS broken somewhere between 4.18 and 5.0 Message-ID: <20190413153435.73ecztpnbivrckvj@sesse.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Operating-System: Linux 5.0.6 on a x86_64 User-Agent: NeoMutt/20180716 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi, I've been using kTLS for a while, with my video reflector Cubemap (https://git.sesse.net/?p=cubemap). After I upgraded my server from 4.18.11 to 5.0.6, seemingly I've started seeing corruption. The data sent with send() (HTTP headers, HLS playlists) appears to be fine, but sendfile() (actual video data, from a file on tmpfs) is not; after ~20 kB of data (19626 in one test here), the data appears to be randomly corrupted. Diffing non-TLS (good) and TLS (bad) video data: 00004c70: fa 70 c5 71 b5 f5 b7 ac 74 b0 ca 80 02 4c 06 3f .p.q....t....L.? 00004c80: 5c 5b 0c b3 e0 a0 c3 21 93 d3 6e 65 36 70 0a 27 \[.....!..ne6p.' 00004c90: 84 67 16 2c 95 c0 55 e1 04 76 52 10 50 5d 00 26 .g.,..U..vR.P].& -00004ca0: 0c b8 84 70 7e ed 12 8f 5e 7e 18 c0 06 20 02 54 ...p~...^~... .T +00004ca0: 0c b8 84 70 7e ed 12 8f 5e 7e 0a 60 9f 1f 97 f2 ...p~...^~.`.... -00004cb0: 1e 4c c1 71 7d 0b 91 28 23 98 09 ae c4 95 ae 7f .L.q}..(#....... +00004cb0: 6e 17 50 03 67 fa 2f 83 b0 88 eb fc 54 f2 0b 00 n.P.g./.....T... -00004cc0: a2 92 20 b8 f2 b6 72 2a e8 7e d7 27 99 65 56 70 .. ...r*.~.'.eVp +00004cc0: 6c 9e a1 02 b4 30 11 25 d7 58 b0 0c c0 6c e1 bd l....0.%.X...l.. It never appears to get back into sync after that. Interestingly, it is _consistently_ wrong; if I download the same fragment multiple times, it breaks at the same place and gives the same garbage (but different fragments give different divergence points). Tested with both wget and Chrome. Does anyone know what could be wrong? (It is, unfortunately, not easy for me to reboot this server at will, so a bisect could be hard.) Please Cc me on any replies, I'm not subscribed to netdev. /* Steinar */ -- Homepage: https://www.sesse.net/