From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 83E1E334C3C for ; Fri, 30 Jan 2026 08:44:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769762662; cv=none; b=oRVVgKm212h4SnojDZ/QTLRTMrV7zhyVLxTHKTzHCWj+mYDMZjQLiwzAFJIyK0SjJAmLBuUlI/45m7DrShmLgDSouFnVHoX/YBhr6fUyQ/Prw4bYdhowS+JQqW+Oa9qOJmNzcG+cal/plwzSs6+LPXkJOmCedK3ghWyQxB2EcZ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769762662; c=relaxed/simple; bh=Se2TZEtd1mmElnC/ZfubyC1jOuxzf4V7hbuk2QTCVwY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tMfGBUg/rGHEij4vYYippq4NTe8FUctoJwDJ9bXB54Korrwd3Fdqyxt+D5w/5aIHU2bfbr2UCLcaCfKczkdyBJ7mXc13Yw5nO9hOFE/qIqYZpkUethyju+K6m55mENk5FEx5I5e6sDgJaK9GthNv1Y7Csv1UkrOeTw1i2XD8N4U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jVF6hor/; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jVF6hor/" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-42fbc305914so1697640f8f.0 for ; Fri, 30 Jan 2026 00:44:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769762659; x=1770367459; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=BhdgDuWmGVX3Ii7iXI00D64FLe4zlVQ9D5T9rX3Mk2U=; b=jVF6hor/hxRKdOzus1zTjxtt4tv7p8w77QRqivR0TD3RSXs0H7tbYgBtDXdjYPXpi5 OuPXS4/3DQlRlvmTqZ1/9IIDUwQ5Vb06jbN2FcLGr5b3LbaqdX1sDacZQNa7SO8VucDP PR54KodU8kvh2RWDIIY8GfRgKcLJe3SZCFVqHtkSE8PEO72d7BHZz7SCeqNk6BE+oNLJ UaFbCsxBmV9BH68BlfLllr8yU4K3drmFG63h+a8mlDb4Pbpeosz/+oZ6AeV6ALhIF7A2 29rtEkYeiw+TwRUfrZpEFxc0WUtT2uX4T8poAG89QgZNStx36fPdx+hIMZ0/CEf4AU4Q sToA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769762659; x=1770367459; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BhdgDuWmGVX3Ii7iXI00D64FLe4zlVQ9D5T9rX3Mk2U=; b=mR3Sa9jH2wgJ3t/0JS8dL0W6n4kJxAvbYc7eY1nhMuQxcysptKn7LbvT/5oUqcc2dN a6qJ3WMqzsfp+furkQv7dOedspF2FQXxiCl1bmBs+7mxQ975jxSaccgKV0sMjosB03lR WLXqMOgimRXz22LdcNp2gYBtWJVjuULVfaQwc6CCAxS0qYTJ8XPhtTg8CkCYxPp18B+I Y7CfNBboIyLaYz+guvJn9/07lA8yBpdkz5uO4nuvjMhka2mo1xps1El2HrmQU5Moia8p z9zOoxkYtfasORzBU3dh/ayxB55ivzKFuOhGRMzJPzoEe8XjALdtzdnG6mqsHxpmE6Jb msMQ== X-Forwarded-Encrypted: i=1; AJvYcCUYjt7wqgAly9SvKlQA+EyNbgLCj88j7PwCtu3RNzKF/K19cpB+d93oCsWVjcWFRRQUAYAObh5vVZCJpT8=@vger.kernel.org X-Gm-Message-State: AOJu0YwPCvWsHK+G+EwQy5NvQXY52x+mZu0gyQuvHGXHhOPgqZYFBjrC IJm667p6BddVZbyu3IEtlFCSkhXNmFTkUzrkNXct7NksEhKqatQwZKGbVRL4T7fW050= X-Gm-Gg: AZuq6aLsN0spMkkVC+3VuUIiyx2DTwkzR0PXlLfWP/Ga0plC9cl80+QsnqbUhQU704i mB7VdYHDnl3A9tDXWIRpOrQLHTA3a5URpQtgGUahC8cQ6ziveEqk1o2qpNy477uI4asvgHVyT+g CUkWk48zDnAPHbSG0vMHAtIn21xW1A3I7X4MvM5u72wXq3ykImLSjk+CTPcDzDtJWPLSjgtEBaY XHJFewYwIFcgMuDUE72a3+sBQZoeVkc1NxXwSNtKdLdS8CB6DuRC6rr8Jzng7TS4LUJKFW+bbrb 0NF4qWbqfPNyQjFl8OeDIClTbqHCzQlo6zviIULmYCfgBx1o72HSq58KviEv3HUiWoP0fxctQxM jZEPo8ujRVPG4whE5hb/ssaydrCZBBHH2SkOruUDkLBzXtg8G/ta0f5iY6gKefnEk2OjJZfu03b 8PkCYJlcbQImOS4exr X-Received: by 2002:a05:6000:428a:b0:431:32f:3140 with SMTP id ffacd0b85a97d-435f3a81d19mr3457102f8f.12.1769762658743; Fri, 30 Jan 2026 00:44:18 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e131cfd4sm19785768f8f.25.2026.01.30.00.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jan 2026 00:44:18 -0800 (PST) Date: Fri, 30 Jan 2026 11:44:14 +0300 From: Dan Carpenter To: Luka Gejak Cc: gregkh@linuxfoundation.org, straube.linux@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v4 1/5] staging: rtl8723bs: fix potential out-of-bounds read in rtw_restruct_wmm_ie Message-ID: References: <20260129181541.72066-1-lukagejak5@gmail.com> <20260129181541.72066-2-lukagejak5@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260129181541.72066-2-lukagejak5@gmail.com> Please, slow down. Only resend a patchset once per day. On Thu, Jan 29, 2026 at 07:15:37PM +0100, Luka Gejak wrote: > The current code checks 'i + 5 < in_len' at the end of > the if statement. > However, it accesses 'in_ie[i + 5]' before that check, > which can lead to an out-of-bounds read. The line breaks are weird looking. You're putting a new line between sentences and a blank line between paragraphs. Just put a blank line between paragraphs and delete the extra newline. The out of bounds read is most likely going to be harmless. Hopefully, it would be detected and trigger a warning from the UBSan type tools. Also if you got really unlucky and in_ie[] was at the end of a page then it could cause a crash. This bug is still definitely worth fixing. > > Move the length check to the beginning of the conditional > to ensure the index is within bounds before accessing the array. > > Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") > > Cc: stable@vger.kernel.org > > Signed-off-by: Luka Gejak Delete the blank lines in the S-o-b block. regards, dan carpenter