From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 E360C145FE0 for ; Sun, 5 Apr 2026 11:02:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775386959; cv=none; b=iFLT4oN8poFQWuO7mjVUvu1SjcpOYDKFj5VgsALMN8eKfk3DnQ9baitVOySk2Fd0O+60/NEDGwwmy1OK9LjnvTT+YF0lrq1SnweFzi7yjnkEEZCsSxoq97BZZEpqhSSirABH4LCeS61VSPr61uSCc4CaZEPbbzMCSHVyzAp+6Tk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775386959; c=relaxed/simple; bh=uhcj4+M8ewsoJAYo4/IwJ+tyF+usWD9SiHrQBKbiJco=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KW8dGKAJ6Lob3+/5r+w9cGcyFYKgUd8+dq25NZetj09SVOBcP5+DsGvZ7UnHZMi2ko6DoVm5gbWjt6j00O4sH2drSDxJriho2zFN7KYWDIakey8Nx0lPKYSRGbRbPM+BaKpn6C//WxCJbxcfBayHY6XldW3FdAt/3MiaBLv6qgU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=tHIIaSJD; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tHIIaSJD" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-482f454be5bso44960815e9.0 for ; Sun, 05 Apr 2026 04:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775386956; x=1775991756; 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=5Z2SScjl33qfp9r9oSnvAllDjhwVuv6H0d941JxUe2o=; b=tHIIaSJDXx90oYylK8ldsZKuApxloOMBM5HY75Z7GwUCPDxFLYzMy1FsDfJjiamE6e lEzzXT4EnYtWiSlS/f6A8/tD1GHrkD2aO9nME+pEbauoQMtX0bLNe5bPB2mSb4wNhKKX OypNZFO/I6lTfCru2oFJeG8oBIDs/b9wEVfRYXe7i7KkmhpigKsTgk8CTyNGhXXENt+L VJe689925HHI7t2V1VZhESBY0nZIKTM3+bTfZ36IxX2rZbNE1wxx5x/beynhonM9Iwok G7EtJYAUj0uR1XFrnCTyrFLAtiQFIG2FjK3klYYbQGNIHYots6WCwe5Qrwg8vo70wdh1 MWcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775386956; x=1775991756; 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=5Z2SScjl33qfp9r9oSnvAllDjhwVuv6H0d941JxUe2o=; b=CZyjmuD6h38CeX0/M0UrIVEo0QDAosscxJr0W7dC2vDMo9ape8gSD6NlS/HDLmra+R YBM2h1wRDiHobjU+JQxLiPLkwS0FugoY0+F+vzjJDVg7mSDDx8B141OTxQHEGEqZ782I ooFdVYdvzcEswiBekSzNkcQs9KR8Txs/3FzmfKElALOSTO81AWqN7FLDH6qNQu6RJr7U D3R0ZfhgdGvkrXV2IUxO6zbBdxxXSenTpwotjOX9znCYzaPyHs7C1RM9XONUeN28CyS6 gYVQPfzIRnvQzFWy/fPeVKvpbT3nT2fRg6tTTRP75QunsW2NVL+iTigpetdUQMpHWOse /OpQ== X-Forwarded-Encrypted: i=1; AJvYcCU0hTS/umFjUnbFkepxv7xdjaLt0Wv8yunF2JlmTN3OYywzzBSa8pULgj6H7dghOLJzgG7e6/cfBLLfWEY=@vger.kernel.org X-Gm-Message-State: AOJu0YwebgP/p6PzE412xyAoyfqR9hac1IKS5URllfOd0jztL8YzAIne yANU8hHUUvCGBtrGHRPY9ZTZWeL7lYoFEnDJt7IlKD9qrKrNf11GlsvlmjJEEw== X-Gm-Gg: AeBDieuXf0jvz42DBRVBBFH2i7IPB+KxkbrC16J+MCzpTHZZ4yfhzfZjWUyb/bJW7Ku kmAaAViHW2Jo3Uz3uEsdLkXik+z8Nb9Lg0LrsatZcGa9P/WmOg3xNH0Z1ccmCQqWAZnykb5lFG8 Kbq/nZy/3acXbyWeuJNqWKmguNMFFz+r7gyhTAvHxGMOP1KpDMRJtLsEWXDrOz+O/K1TKGbqzW8 2u5677d5cdzqw0ALGHpQ7DY7L1M0TtozowWiRqSF55L3CPoF6oYylMP1qTMBNIS2tVbPCm7LbWm U87poiQZSzO1jB7DzZW0/aWKMTdPY4gyqHYRo4NEIsXhrzdiB/sQRgf5FbpV09klPvAgAbEP1tK y+y8wby4/v1ii5qZgYv7HWI2Dj+OPdCcGLz0r8an0q6ZAw1EzBbB63zis/TtwOmf38QodT0ngGx kjZOtC3Un6zMKR/1CJd+sFuZXcUicpoA== X-Received: by 2002:a05:600c:1394:b0:485:3cef:d6ea with SMTP id 5b1f17b1804b1-488994a7a76mr125133135e9.13.1775386955970; Sun, 05 Apr 2026 04:02:35 -0700 (PDT) Received: from gmail.com ([2a00:f41:1c83:b0bd:2a0c:50ff:fe2f:36f4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48899e457bdsm61329315e9.20.2026.04.05.04.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Apr 2026 04:02:34 -0700 (PDT) Date: Sun, 5 Apr 2026 13:02:32 +0200 From: "Jose A. Perez de Azpillaga" To: Delene Tchio Romuald Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] staging: rtl8723bs: fix negative length in WEP decryption Message-ID: References: <20260404230248.62203-1-delenetchior1@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: <20260404230248.62203-1-delenetchior1@gmail.com> On Sun, Apr 05, 2026 at 12:02:48AM +0100, Delene Tchio Romuald wrote: > In rtw_wep_decrypt(), length is declared as signed int and computed as: > > length = len - hdrlen - iv_len; > > If the received frame is shorter than the combined header and IV > lengths, length becomes negative. It is then passed to arc4_crypt() > which takes a u32 parameter, causing the negative value to be > implicitly cast to a very large unsigned value (e.g., -8 becomes > 4294967288). This results in a massive out-of-bounds read and write > on the heap via arc4_crypt(), and a similar overflow at the > subsequent crc32_le() call using length - 4. > > Add a minimum frame length check before the subtraction to ensure > length is always positive. > > Cc: stable@vger.kernel.org since you cc'd stable, a Fixes tag is needed. ... -- regards, jose a. p-a