Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5580059imm; Tue, 12 Jun 2018 09:56:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIds0vczvKObiGU6MSpZySCn3qt5GhHJzQjiernGpr9JPQwMKixrSEBVlMzHiSkW8Cx8nhb X-Received: by 2002:a65:5086:: with SMTP id r6-v6mr962414pgp.375.1528822580593; Tue, 12 Jun 2018 09:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528822580; cv=none; d=google.com; s=arc-20160816; b=mII36QL4cgmAA+Z5kcLnXqkPoVqst6zbyi3pv2rdk135Y5pMg27dJGf7+FN4ysLtRI F2wqV9zho1S/0paqwWEFplYJah+uD1iHg2VPteBrb4pJxHlnmWh09U+ZryGZQu/p9An5 0fYxFVQntXw/GGKguyMnWdnbCRimj8kuzWnA+8bauBe3jWk28Rmj2Iy09VNbs4I7W2GL i4fgc6rxer8wM+CgeQw/GoIn0rLlOmbFpn5W3vaXcJLEY4eEqkIjRZNyDA5LHBGR1HMe fg4JTZzpKF7eVFuwXD9dcu0IA4MDcBduoclGneHXyGd1xFPDoxZJTDNTrXLcJDEDnHIC 0+6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=hGfCkE3u7f4uVNZEIBFLyIy0/L8jewE5Mle72VIhE8g=; b=ybO3VjhSl1FWrI92dSuTO5Q4o/J7EWBn7mtfemqXiFtH66wyWVcJczg/S35dM0Fpws xQOa5idFXAdER6Dj6XUR+QOPuR+qUXYEfvRa9tPUlFIF7lu6vVzQaxyN3A2VqDy5IRNS RmypH1bD1wVZUajj4kW1wqBQolZ1L9A6QZtQ8tx7L7vdWMrSBDfAhR7DK3n4LKvxAr65 qUl6mSSP6bov0V1LaBKaWt65WsS/4umK6TSTTYm5qffrfwk0LRHxxddZkj6R0uw05aN8 qOiMdZRvdDveinPNKt1/Mcg5HCP81tPXq9+sMZLlNktYaBxHefIyFwEUo6b5EkNNOan3 gTuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZAmUAVAg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n22-v6si465159pff.370.2018.06.12.09.56.06; Tue, 12 Jun 2018 09:56:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZAmUAVAg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754413AbeFLQyh (ORCPT + 99 others); Tue, 12 Jun 2018 12:54:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:56608 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934838AbeFLQyc (ORCPT ); Tue, 12 Jun 2018 12:54:32 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F43B208B4; Tue, 12 Jun 2018 16:54:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528822471; bh=v5GfxsQGiE+bBMmN2OxgMT5z3I9MNKJB4U0/2M8DwkY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZAmUAVAg/3t9QQBMKfFop2AUjvUNUqEvQH8QFFZxJ7mvyIBA6VlqlNVbeEvh9cB6d uqI9BXhT0ysDV0FNlLbUk2qggtJEyYbPHVg8UY24IKXKS5XR+94vaIhIYUMpbbBshy YITh6yIhmnhuKSaRyzZXoTwHUnxQcQxT755SN86M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+e64565577af34b3768dc@syzkaller.appspotmail.com, Eric Biggers , Johannes Berg Subject: [PATCH 3.18 03/21] cfg80211: further limit wiphy names to 64 bytes Date: Tue, 12 Jun 2018 18:52:00 +0200 Message-Id: <20180612164825.530260391@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180612164825.401145490@linuxfoundation.org> References: <20180612164825.401145490@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Biggers commit 814596495dd2b9d4aab92d8f89cf19060d25d2ea upstream. wiphy names were recently limited to 128 bytes by commit a7cfebcb7594 ("cfg80211: limit wiphy names to 128 bytes"). As it turns out though, this isn't sufficient because dev_vprintk_emit() needs the syslog header string "SUBSYSTEM=ieee80211\0DEVICE=+ieee80211:$devname" to fit into 128 bytes. This triggered the "device/subsystem name too long" WARN when the device name was >= 90 bytes. As before, this was reproduced by syzbot by sending an HWSIM_CMD_NEW_RADIO command to the MAC80211_HWSIM generic netlink family. Fix it by further limiting wiphy names to 64 bytes. Reported-by: syzbot+e64565577af34b3768dc@syzkaller.appspotmail.com Fixes: a7cfebcb7594 ("cfg80211: limit wiphy names to 128 bytes") Signed-off-by: Eric Biggers Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -2026,7 +2026,7 @@ enum nl80211_attrs { #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS -#define NL80211_WIPHY_NAME_MAXLEN 128 +#define NL80211_WIPHY_NAME_MAXLEN 64 #define NL80211_MAX_SUPP_RATES 32 #define NL80211_MAX_SUPP_HT_RATES 77