Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp174074lqp; Thu, 4 Apr 2024 09:48:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVDDx91zkrbECliej3wJm34AtWh23gO8gncBz9cVfnPPhC11M+HfUuPuGmWyJPKhtEKr8AY7p2yRWUlP2YtbR3jks9uvwIiKCdpMKSKqg== X-Google-Smtp-Source: AGHT+IFM2itehJoK8GwsJR5256/SssE5ORLYD5gvLuDXTJrdlVdiCf76WCYF42nbHeKXeWGgfxGd X-Received: by 2002:a17:903:110c:b0:1e0:afa0:cc9c with SMTP id n12-20020a170903110c00b001e0afa0cc9cmr3814135plh.2.1712249329337; Thu, 04 Apr 2024 09:48:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712249329; cv=pass; d=google.com; s=arc-20160816; b=Jzyh5/xCiwA8XzOOkvouXcxAj1f8HvZi5I8FCfalfw9FDCVXnThVmhTTjaF84qWxPF TLBFMagm0tepBvEiTlCF6nthFgFpxSBOyLDG//hdeYm1Jqb2HR8lpP3kIpWCUlOYvYjq DfS3W4KVYEPUVbF9rxlvsII9QH/K9Y7WzSGvMlr2nUAZDPqBIG5UUZnkEcSdSymT5TJK QZfvfY5OsTERKDSVtQmD16RiBzHOVTcRyFAYnCAKJ/FAnONHdKFqQ6x4DCVS2B0dgNYt 4Ewp1pHKAp4aKTnQ8ubjoiMSgFsVeKpXIyKhF4sH0xRQTh44BMMK9KvvoyHxOQ5BUqL2 9Q+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=JubjZrC2lioP3RyL0Ciyw/lhrZMZfq1yICuaTDklK7g=; fh=PhSI/+TcGlLjO5+74U8gBaItlAaInS72LzHWEkv4/JA=; b=K6p+OQ+alZZ9X9/RmxyrXmWXgZPXKUCTwSDLywUmPj5Rljzcda5yHpZbQ9yakf0UE2 0NNDVxDImBnCyez1s7/IrxfxjDhL+ml3c7ipAZrYMvtEverCfiC+MrvUsXwu8p6AFmky bRlDdETvdc5gJR8+LSSiM8pY6viEIaYZ+osQsE5l6aJ+aINMUxpi6Q3itr/0aCGC6m4K +pFzRunkBJ0AMPFA4jBcWQxiJ9DOjv3Mpc/PL/MIYtJ72hiv6hPnpIsdC9i2ONQpEOPP rlvT+P4OAkqPGtidZfasbqi5qJi6XzOdmf6Zms5SfIkfW2EnoSUyG3qRnHu7To3eT/KO ryiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=EZWFKZz9; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-131660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131660-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p7-20020a170902e74700b001e2afe22aaasi1564812plf.332.2024.04.04.09.48.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 09:48:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=EZWFKZz9; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-131660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131660-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 08399B2635E for ; Thu, 4 Apr 2024 14:57:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07C381D543; Thu, 4 Apr 2024 14:57:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="EZWFKZz9" Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D02D1C290 for ; Thu, 4 Apr 2024 14:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712242623; cv=none; b=hcCy3ZnD61DDwLMU9L/iF8vzBDo1T7zXEbiJ+hhZgEUS9QA7TivhaaOzkmuGhE5zPMS6WPUz2odn7Sz4xqd9C2AFWlG8bE1XOMeq/Fj4AyWHVY3O5R5RboNKg1WwOOcqQfWLqjehtvmZfs//y/qBABtkX0nTxUDPB/Hd9K5rSJA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712242623; c=relaxed/simple; bh=IaFoOl62tcCF59UV0efY1h+CjVTA1CJAzdIeBir6ok4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=sUuE0QE3cxPIGWWenm3BJggh7P8oGvA8Ro6WZd+sV2CYGwpQq1J005Ojqi91iSKPS0nCrTdVAZYtXSIvlndi/S3JtTXnIaU7NKnO+1KL9nvMnvwp/2nUXMV2dMXOIjpY3UCVc+scJEJLmgKSmy9l9A0Lp17Mx1uGK9KWFaFfFCA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=EZWFKZz9; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-516d0c004b1so588701e87.2 for ; Thu, 04 Apr 2024 07:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1712242619; x=1712847419; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JubjZrC2lioP3RyL0Ciyw/lhrZMZfq1yICuaTDklK7g=; b=EZWFKZz9RaX+148XZhWYsTgLQGwdwBNK2VrEsmAVYD0ariqC6TUDJt/5DVda2RuLQV TTLscQ5C6nbhsjhYJNyyxYQg37yETs8EERx40byG+/y94TqxKEJfEKcjhMyMaT7hC1uU vs+wO91bVAGGkf7PgCUrdsg8ShpLTY4ij/+pX2sKIi3KsJCbmS6rmMPOiS3s8rmWboRT 9mVrcvq8+O+k9nDWPgHOdDEHDvam9u8xxBTqtWirvSQMEnQ9rphkvggpG9alFDcjysy5 4f8OQY02+oCziX2X+NtJ4599YAlj2rzjSSOoZFI39Oh4um+rWwpHPMQ91H7c8z3pH/qF tCqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712242619; x=1712847419; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JubjZrC2lioP3RyL0Ciyw/lhrZMZfq1yICuaTDklK7g=; b=qOrXAg6/MJ0uiB5H4zwKks4kVgReb/D/v+82NbC0ltADnCx+nq7ovA94eTN0zgq5yz J1q47kVaMC8Ja6oo3OGsd7lRaFYAttS0z/E72B17X7gKF12f7k7uW6v4zKbwQz5IpDdj 3RXL4Sp+mHvL/TrWX13opvWADL4NYOsphyl91PZtBQGfwTQ5FIg2ubYk0cMikNhs0I2D TPkwcm/plb+tA0OrLD5ZT/YoBpecIY8u3z2hx+5ZOtJW3PtKQKZQ0mLf5k56fY1leYcL 9rfAyUYOgDUPNnRWCPC4A1qoDLLg5xYznhYwK7JXxcs6vEy4u1gj2BFXTM/hgEG4vyWb HXMQ== X-Forwarded-Encrypted: i=1; AJvYcCXLjwfpSL9hMa2nzGpJb3finBHwgeljoFyIhBCBbIPETGk3WpQ3G++AaW9oXa1ZQpTk20wdHsPfOnXYLHt0vIA2o/3F0JLKh+V/frCv X-Gm-Message-State: AOJu0YyLV705tOigNKr0KE1/qdEa1i78DGYzdkk9FBlcFsk5xvOiOFV3 aSUGv8d6A/24jhkpBeF6FGBcQxXr7XwgB0Wp52MkKBvesuEVSRLLtXN+yKN9J8PazNvDuTRZX1J e2QhQtCm8oBH7MhoWblNjMJgq2qWM3eN4xJaauQ== X-Received: by 2002:a05:6512:358a:b0:513:db34:7caf with SMTP id m10-20020a056512358a00b00513db347cafmr2178763lfr.17.1712242619402; Thu, 04 Apr 2024 07:56:59 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240404093328.21604-1-brgl@bgdev.pl> In-Reply-To: <20240404093328.21604-1-brgl@bgdev.pl> From: Bartosz Golaszewski Date: Thu, 4 Apr 2024 16:56:48 +0200 Message-ID: Subject: Re: [PATCH v2 0/2] gpio: cdev: label sanitization fixes To: Kent Gibson , Linus Walleij Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Dobriyan , stable@vger.kernel.org, Stefan Wahren , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 4, 2024 at 11:33=E2=80=AFAM Bartosz Golaszewski = wrote: > > From: Bartosz Golaszewski > > This series fixes a couple of bugs in the sanitization of labels > being passed to irq. > > Patch 1 fixes the case where userspace provides empty labels. > > Patch 2 fixes a missed path in the sanitization changes that can result > in memory corruption. > > v1 -> v2: > - switched the order of the patches in order to avoid introducing buggy > code in one just to fix it in the second > > Bartosz Golaszewski (1): > gpio: cdev: check for NULL labels when sanitizing them for irqs > > Kent Gibson (1): > gpio: cdev: fix missed label sanitizing in debounce_setup() > > drivers/gpio/gpiolib-cdev.c | 46 +++++++++++++++++++++++++------------ > 1 file changed, 31 insertions(+), 15 deletions(-) > > -- > 2.40.1 > I'll go ahead and apply it as the culprit already got upstream and into stable branches, so let's fix it ASAP. Tomorrow once autobuilders confirm it's fine, I'll send it to Linus. Bart