Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp24290imm; Mon, 14 May 2018 20:11:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpJ79LxFIUkObJ50Dv6AbbS//EwTD+PnCQrfwQoGSivZGhd2sgpHIIVI+GOB5GBh90412Iy X-Received: by 2002:a65:53ca:: with SMTP id z10-v6mr8457715pgr.413.1526353865646; Mon, 14 May 2018 20:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526353865; cv=none; d=google.com; s=arc-20160816; b=ePsgBOl2aAL3lInCqEa7uJaWi1STK2Z5jY4vBHPSDIpmnRfVzPXtepqNuIrtajYafJ p6B+TeJkHeWXdnVAEGTz5fk+5P84vf48cNNV1IQaX2HduiZVoqieZOkHdAP1RsL7DwZK s/oLU43BK2laXuwnYL/G2P2FeEUSInLS5LGcDWi1SZT8yuKpj3ZElS6jTw7qVC0izFW3 a4IDq9xp4WrpgxfBmMIJ0e5jFB90dsrfMloLHZYs24Wu0yrW+0EDBThdIxhLap2aJLmh dpaumY4s8nVd6h2D0I8spuAzzQxCKNq55X4OJoOJALvGJnnYcs9/jjopoIooBllHZP5K w/Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=G9tlKbVq0EoFBHmECGUKcKYIh6hGJo0XvqilMNxwTG0=; b=EgKHykwBA0Z3k3VEnEcxgI8SqLwjPgnkouK6wkk1lQAfOF3+PhDCSOZizyoVGCxhxm uEsNjTwlDuBIOjFDx4oiTIjrDBNFwnnIU/nXYk44QZN8LGGft5TqwIQqVHFvb7Xw5fzj wbdc/gBEauxhV/PPNNHY8utYKJh4eBC7GHqk5teHy3PwkulY+bLcqVfXZWBN0UtCO/of vpQEoENAjhqkI1P/hcxykbPT49vmS7ngM9ryQM6RQd9OPHQ7okb5/qMfZnw6rMig1GbE /Y28MngCYJiEXdA5HWWP2algxLmQXj3YNRMGKg2HONr1lQ/J5ajapIrsBdFmJMslHMcC jlRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k5fb3FrD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7-v6si9050566pgr.88.2018.05.14.20.10.51; Mon, 14 May 2018 20:11:05 -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=@gmail.com header.s=20161025 header.b=k5fb3FrD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752096AbeEODKn (ORCPT + 99 others); Mon, 14 May 2018 23:10:43 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:44348 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752009AbeEODKl (ORCPT ); Mon, 14 May 2018 23:10:41 -0400 Received: by mail-pg0-f65.google.com with SMTP id x145-v6so6333681pgx.11; Mon, 14 May 2018 20:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G9tlKbVq0EoFBHmECGUKcKYIh6hGJo0XvqilMNxwTG0=; b=k5fb3FrD6FmnGBlh9RUNULrLcAJLO3efniqjI5uCxMgF8Rpq947RsLdpC0wEoA8Ppj YbToc4XZ6ndhlv/4IjyimKzb3U/PWvdar7O3LRk0i/e/ZHmumfOXGlyACWZUVafSBdMY Z+CanN8PnB4wU8KIJxnwRPaqLOM6xo+YbPAK5QQzARc+Oz4nqRn8pW8S1S6idXouj9C2 LOoiYWLdCCsBaTslf6xs03pqEKwM1EB/rKr46VkOk9CJkcglWMQgIjwfaXc9l2LP6Tyv c31TLzKXiw984kHAzv/jsbmN9XNzmbJ2Hm7yKEWsswK3QY1XTcDJLEvGRsicC8CvWs4y v+UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G9tlKbVq0EoFBHmECGUKcKYIh6hGJo0XvqilMNxwTG0=; b=Lr+RZJPAL7F6yznrG26DJAYQzcPLa9Pflc777IY1Spj97bPZL8cJa1y+qxr40bw/Ve jHoRPsy+nre1802asiqGfYrA9XqZCm1V3fSlZ77Y/IdpAa+uZxo4wIrzffTFKqZSxtRw v/2igah93fBjZkEF47nMFllrs6oKK/P/TJt5FEB82nLlfcDyrCr1Ij3B8Lw5JPbOzdxq NQ1ohSgk3sKes68Is5+OCWT8QwBWZh9KbHyPozOajTF/vpHf9bQ9sTM29FS9e3Cn6GLt j7baWoKOl6SAGeykIUpWzSScS727/gFVxyFhwiYUzsjyRvsln2/hnrWMVs1UAehITGdT e5+A== X-Gm-Message-State: ALKqPweqlPUYodUkwlQyFBXWKnq5jQ3/7V1JZXZlvcIhjbyFKrZ6VK87 JVPkg70odYMtpP5QYo0PRT2skKOO X-Received: by 2002:a63:7311:: with SMTP id o17-v6mr10690742pgc.238.1526353841022; Mon, 14 May 2018 20:10:41 -0700 (PDT) Received: from sol.localdomain (c-67-185-97-198.hsd1.wa.comcast.net. [67.185.97.198]) by smtp.gmail.com with ESMTPSA id s68-v6sm1061167pgb.45.2018.05.14.20.10.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 20:10:40 -0700 (PDT) From: Eric Biggers To: linux-wireless@vger.kernel.org, Johannes Berg Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, Eric Biggers Subject: [PATCH] cfg80211: further limit wiphy names to 64 bytes Date: Mon, 14 May 2018 20:09:24 -0700 Message-Id: <20180515030924.27570-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <1526300027.8070.0.camel@sipsolutions.net> References: <1526300027.8070.0.camel@sipsolutions.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Biggers 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 --- include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 9c3630146cec0..271b93783d282 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -2698,7 +2698,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 -- 2.17.0