Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2038197pxb; Mon, 12 Apr 2021 12:38:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjG7SVaxdvjCUTm4Yoil44/0sh5yODSQpKgMPhqTPU/cms2rr5e2D1TsmXl8X0pEcCGqzE X-Received: by 2002:a17:906:2e14:: with SMTP id n20mr27983453eji.16.1618256332093; Mon, 12 Apr 2021 12:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618256332; cv=none; d=google.com; s=arc-20160816; b=EeJ+ebkxrAGcoT2zfkxmZPaLZaFqcJYcPrYs7AfBPYKmQ6gPJ9W5MbhkZyla9NWrfY 51TTMGHN+7Vtu9AEmQ0AxzjFrRDJw/K2Inr3tWFN9mbCjWmT1hXv9yyZH0HtM61rcNgl 75l7uNra0cW5K3IiDdd8FriWS35Bvry2srIUT1yovom90Rm2sVxvsmVhc6ZeWjgCxtKg pS194xT8V7S4Ng/V30yrYmT63wbhSQcxS8wST8Y6y3RzFcAurYx+eqhmCPtAL+JfACFL HYshOtOmVXUy7C62bV7Z0mzATcl+zYs1/EeiB2ri8HBd1eESyHPe4mQW2yKaD/43gClt uRqw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=EiOhwiYjhaXhgVvIckRRHlUJBa+tsOl+3FTQ9jBZI+Q=; b=XrjjxKO6W1uEY9Dh73+3nu2oxpMBfQQ0agd2Xxq6yzSx1/s+ST5psIP5nkkexYsEub EDSUZ2ef9UHiGLKDwZCEP+fSCe+HiKbk1ur9a+euP/B3DhDIEKwl4zYmlkopOcO2ptv0 OqX8J9Rjd5YSfOV721ZOjC2uUFTFhBtZiYxxxYnif90zDv14S8t7h4YxKuG6kBlOiWDq OGeYRnZdeCz24C88hcfiLoM7gkCeS3G7bAEHgr7T7QncW44Mkd9073tpkSzfa6hIqcAc gsnbFruVKFRj/dnW/uaFKJndfV4IQRXzvl+qbmftB8KMBgKLl+E8Rvxk4UEovL6IyfkK +ckA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="w40IP/8i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si6448977ejs.531.2021.04.12.12.38.29; Mon, 12 Apr 2021 12:38:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b="w40IP/8i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237505AbhDLIqR (ORCPT + 99 others); Mon, 12 Apr 2021 04:46:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:37324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237522AbhDLIpF (ORCPT ); Mon, 12 Apr 2021 04:45:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 546C361243; Mon, 12 Apr 2021 08:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217087; bh=cMS3PyLSIpPxGymW6wpExiagY595q96AmRh582X6Pa0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w40IP/8i/1VENDshugX9CXhOOWV+FtQOG1J6rm5x5ubKimYLSv5mBmfnV4GphrTgC W0R3AO9ieCG64LQWhigLpuRvC5y9I+O/L+pXAED5sN7WtSsC+YUfdU3Xs3JF4sajBX qAyT4w+fdDCXUaeVHLxZ9Mtu2tGuHtKpSIiV3Odg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+fbf4fc11a819824e027b@syzkaller.appspotmail.com, Alexander Aring , Stefan Schmidt Subject: [PATCH 4.19 64/66] net: ieee802154: forbid monitor for del llsec seclevel Date: Mon, 12 Apr 2021 10:41:10 +0200 Message-Id: <20210412084000.192912595@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412083958.129944265@linuxfoundation.org> References: <20210412083958.129944265@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Aring commit 9dde130937e95b72adfae64ab21d6e7e707e2dac upstream. This patch forbids to del llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+fbf4fc11a819824e027b@syzkaller.appspotmail.com Signed-off-by: Alexander Aring Link: https://lore.kernel.org/r/20210405003054.256017-15-aahringo@redhat.com Signed-off-by: Stefan Schmidt Signed-off-by: Greg Kroah-Hartman --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/ieee802154/nl802154.c +++ b/net/ieee802154/nl802154.c @@ -2122,6 +2122,9 @@ static int nl802154_del_llsec_seclevel(s struct wpan_dev *wpan_dev = dev->ieee802154_ptr; struct ieee802154_llsec_seclevel sl; + if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR) + return -EOPNOTSUPP; + if (!info->attrs[NL802154_ATTR_SEC_LEVEL] || llsec_parse_seclevel(info->attrs[NL802154_ATTR_SEC_LEVEL], &sl) < 0)