Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1827286imm; Mon, 3 Sep 2018 10:27:29 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdaw+N2Edn2pmVQV3Ynlo2mMR8RHKnlmrYQLrEW6Yi63KdzczIhrtfpCRAt4TjZ1TnDM9Ly3 X-Received: by 2002:a63:e54b:: with SMTP id z11-v6mr26959180pgj.328.1535995649766; Mon, 03 Sep 2018 10:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995649; cv=none; d=google.com; s=arc-20160816; b=Z2R+8t02EAvIjb52jAKNzfGEdZ9rJXE+ruAcFu3506iQgPer6NTGZhcOanfPhdy99P sQhIqOf4qP10HIldvrYBDjuWQUlQ2DLe9gc7hwIT5UXsJvMVghJg724hz/OnUIh1oTQj enYdkqWNJjtZZvyQsWLpFT14XLWT3h5TmJfIlO3LOVg9narHjysEY9y9BgKBGXvm8GoS AgzaOyWtQ/fSGUQyMV5SPYjPPFRVv8ewoBRgVozZ5/PiC3DhH9NqDQdFuAaLDOaP3jxu k/zKKTg5pDu0r0u+xbTnCfbTWLXUTfY70E5wyfbqHX+2TYLxyOlViFssnxJEZxQCNdsq m2Vw== 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 :arc-authentication-results; bh=uDI2nB3zhKR3KOG9t9n5MYE8i6o0BrMSW+b3AE7F7Q8=; b=K0q1M/hP4W5ruQGPaeXMHB+pY5oFgHPXZOJRp9pAJ/UY6cPF/lDhr6z7iGmKGIwibc LV/4AhOvrgYhAMXKGbDJUqvZyBCCl1ucbObcmQhixo7aaSslJIHzJzMqWC/2x9Hr1AGT 5vojl7XhnY/mwZPXFMeQk4x8yy448w7NLhKRXUT9TqVp5Y0KiN+GxPqmJtgo8CGhMr2d eUYxzT7egR6MBjmunmtbIJDoLaNNnHxqy2qutfJjDNAmj4pp7KiRrErDfA52J2JEoxCy +/G5AlSxhDR/A19+DMu7xmtoLNMoaNVZw0Do6q9uqhB16CcfOmLy+F9hSVMQ6+9x1wgb n9VA== ARC-Authentication-Results: i=1; mx.google.com; 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 x6-v6si12483894pgb.469.2018.09.03.10.27.14; Mon, 03 Sep 2018 10:27:29 -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; 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 S1730795AbeICVrS (ORCPT + 99 others); Mon, 3 Sep 2018 17:47:18 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45866 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728500AbeICVrS (ORCPT ); Mon, 3 Sep 2018 17:47:18 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B0050D24; Mon, 3 Sep 2018 17:26:10 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Buesch , Kalle Valo Subject: [PATCH 4.14 130/165] b43/leds: Ensure NUL-termination of LED name string Date: Mon, 3 Sep 2018 18:56:56 +0200 Message-Id: <20180903165702.082647385@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Buesch commit 2aa650d1950fce94f696ebd7db30b8830c2c946f upstream. strncpy might not NUL-terminate the string, if the name equals the buffer size. Use strlcpy instead. Signed-off-by: Michael Buesch Cc: stable@vger.kernel.org Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/broadcom/b43/leds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/broadcom/b43/leds.c +++ b/drivers/net/wireless/broadcom/b43/leds.c @@ -131,7 +131,7 @@ static int b43_register_led(struct b43_w led->wl = dev->wl; led->index = led_index; led->activelow = activelow; - strncpy(led->name, name, sizeof(led->name)); + strlcpy(led->name, name, sizeof(led->name)); atomic_set(&led->state, 0); led->led_dev.name = led->name;