Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1303280pxv; Thu, 1 Jul 2021 23:56:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBNs7buhnjsDhSgDZ15pN7/1xlXtCryoBVE3s5BmiIMEfhn/pfQUQ2fHpwgUpih6AWRu1U X-Received: by 2002:a05:6638:4114:: with SMTP id ay20mr3073678jab.10.1625208980368; Thu, 01 Jul 2021 23:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625208980; cv=none; d=google.com; s=arc-20160816; b=J9zHtWln43P30YQdt1tDRC7WZou/GKUrJ+dsHtIzz5joOqiI+8TMPAXL30Bw6H6tUU T1ondsR6/y+ds0nQ+E+Y6rZ4DNy4OCbA5Wc34caNg0YWio9Kmh+ngMAG6JV3hJ5CZlIf HLW/HE2scG11xMKY3k3DM9hzUDcpzAOkBQchUwgw1XqKbPO8kgerFNWzoXnlvfyxf0F5 XhNa/Hp9UV5q6B9EY92q1VUJorv5Wlee73xBkjV+LQ/hvn0BGGf+hUYUf/9dH+O0vOVh 2de27/G6AQOoZTBfZ8zzwXM5Tau16/nk6lf+GO6Sx+qJj9w+20bu+8U1svlZdidp46v1 Oa3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=+qqL3stcL81zEanpn177V008fhVVVkp46u6dRYOk8jE=; b=R3xTF2EbvgsQkhG+ppUm38zRqaO8nJkZUQ3w53DrLIstdmsyoscpQnrX0uuKz5NbEG gJp8VUnvGnOAviIQoBcsfg90g86ZeDB9j5jKi8dkpqLyH71Uk88PpodVKYxHvwvd2Lug VZsbqaZc0C/CQ4/RXpEk62GoBCvpHN9O+fehR3QDoXF9YyGfwyTUBwTyAQD3u9GTwUo/ ks1Ri329jsU/m4iCip3Hb3L5wF1N4AEPCUiy28wgkjH0joDlxpzT/1uHDGWSGlmeHEJz CP4jyD1JGLjqYtMxTY5LXAaOYf0/jntQ2behBqbjE6cVc33mDOZAm+iZbR0BJtQL8fpp 74PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=MPZAzch1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si2390052ilq.51.2021.07.01.23.56.03; Thu, 01 Jul 2021 23:56:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=MPZAzch1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230192AbhGBG5f (ORCPT + 99 others); Fri, 2 Jul 2021 02:57:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230189AbhGBG5c (ORCPT ); Fri, 2 Jul 2021 02:57:32 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10AD5C061762; Thu, 1 Jul 2021 23:55:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=+qqL3stcL81zEanpn177V008fhVVVkp46u6dRYOk8jE=; t=1625208900; x=1626418500; b=MPZAzch1bIKh9tGzRdo3GF5LQgPdbEUhuzDTvOfBZmSIjsK B4AIn5ItCPMUldEfC2Lifz51HM6Rreqdv/+S9x2Pj64rineD1Kp7L2gvGMtwcXvLnp2nxXewBPPeZ 8f/iBDYF1riboecutohjZwUF97E933/gHSqT9Dhsjz939q6F0Mkfef1QXIyPGLb9hKKgO705kY8Ev 1Zkb0uqi9iZD91GcYuW70gU5WV/x5+53xgYl9UHHDOIRgs0cXCC1sLJOvvYlMFNTFiIgY9MVKO+aI R/MPbzPwhB98E3WKKHl8NC2lEiLaIluJdq16/ML8r+DKxw1da7g7Tce6w+zwClQQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1lzD4g-00EYPk-1G; Fri, 02 Jul 2021 08:54:54 +0200 Message-ID: <56afa72ef9addbf759ffb130be103a21138712f9.camel@sipsolutions.net> Subject: Re: Posible memory corruption from "mac80211: do not accept/forward invalid EAPOL frames" From: Johannes Berg To: Davis Mosenkovs , Felix Fietkau Cc: Greg Kroah-Hartman , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Date: Fri, 02 Jul 2021 08:54:53 +0200 In-Reply-To: (sfid-20210701_225432_954258_7B6FE103) References: <872e3ea6-bbdf-f67c-58f9-4c2dafc2023a@nbd.name> (sfid-20210701_225432_954258_7B6FE103) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 2021-07-01 at 23:54 +0300, Davis Mosenkovs wrote: > > > > > It seems that the 4.4 backport is broken. The problem is the fact that > > > > skb_mac_header is called before eth_type_trans(). This means that the > > > > mac header offset still has the default value of (u16)-1, resulting in > > > > the 64 KB memory offset that you observed. Agree. > > > > I think that for 4.4, the code should be changed to use skb->data > > > > instead of skb_mac_header. 4.9 looks broken in the same way. > > > > 5.4 seems fine, so newer kernels should be fine as well. Also agree. > > > Thanks for looking into this, can you submit a patch to fix this up in > > > the older kernel trees? > > Sorry, I don't have time to prepare and test the patches at the moment. > > > If testing procedure mentioned in my first email is sufficient (and > using skb->data is the correct solution in kernel trees where current > code doesn't work properly), I can make and test the patches. > Should I do that? Yes, please do. Thanks, johannes