From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 63F9033D515 for ; Wed, 28 Jan 2026 09:18:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769591933; cv=none; b=CmfyWJZ04p1lxBIf3a4hjrff1HrVT1KgAuOYFTkTISrzInWD2RSzlzH/t3mtR9tpKDf8wY+2tfNEgKnHHkNad8K5zFbDW3DBWfwNwhSKpClXRiPv3p3SM+kTX60rSZSuWs+H2ZB8Y/5jO8xUDT7rXcMrs+1Kf6lhnKOS4tiRh5E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769591933; c=relaxed/simple; bh=NxP4KNIwSM842MjhriZFA4yvkiIjz9n9ndo8fZJDeyk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jsrc2GDKeKDvPtdBynTSJoiFn3ngtg+7SpAOpbIIy+gydsRKwiCXz+OcI6PZp8fkamRAP+qgbnqiXvCzZ3lyDR6HLakJbhQ0kBiuXXQQJuiKlaC3LQjz43EX/UYeRvlSBzX8mLE/mYIfaOMgO9B2HU5BDld/mnW3yq5D+hYHUSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=W795d0kt; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="W795d0kt" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47ee33324e8so50109735e9.1 for ; Wed, 28 Jan 2026 01:18:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1769591931; x=1770196731; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=2iUykOebzwtZerThXQbRd5G3/AwUyJogcaj3LMpZVAM=; b=W795d0kt1XNP96Q0rui88+ZJC2waGCy9rC4fAFs4G2V48PPbaAKMHNXgAj8wVJvduL cjGZrTvXrN71TUDOsh+1oGKQX8LQ7YqBAY5kbT88R0wuNqrqXdYm4dQYNA1z9D1AU2O4 wvsBKJdLzmqcdzu2lHbDOdfmVd02oL8zIBFFKP85+SNHD5pDMP4eYyRjXPb0+Ue7RP3D ek+zTTaXka6DNIe3+/w13dgQv/bxaZzTzIrtOQhbSC2X7tynTYYTrhPBnga5XX4wpUOx MezK4L6679/ZPWtNtv5MNBToSqbyCiQK46TX/PWzq2DXPqzLCKD7C8LKQw3qKrGQhUr1 6o0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769591931; x=1770196731; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2iUykOebzwtZerThXQbRd5G3/AwUyJogcaj3LMpZVAM=; b=vpz6wF0ewDdenbn1tvyjver0XC3mXwJUuey6V0ATP1//if4X3NyPb3WG5oYbyH57/R Z3oZlZcgPzrEeafM6GOoZLVyYWWY4gxl6P5KDtzkVwygJSYU+35N/GEBdcqbiwhqGP6q fVfcNhtsYvlalH8y4kxPFXvquoY96j+3gFpsRmlGgY4u2w4kSubpkFol38m/AqR8lysw MXCCT+slnsCj1y4sCuih8d4e0so5m9HA0BckPzvqjZC39WGWntjmIleDvMLLdzQlb7d+ jFrsWEF4MirSE+YU2YgpXBkEOvFdKOpLf3rgnug7N6iHCt2UIqrCo+wBbLyfhtCtKp7S WC6Q== X-Forwarded-Encrypted: i=1; AJvYcCXkU09PMpoRdHwUPC2q4tFjNM63gSwtuFBacPuaMaJ18bhZWiwVJQIk50JRXsKREPsCHkUcxvd7VxzW4SU=@vger.kernel.org X-Gm-Message-State: AOJu0YyXmT5u7JMrPLz0kZlxXg2iFCRJW1C0FAtfM4AzNSvZrbDwNf1O ipY2JWoLD0FSBJWvu+ex4HtadNg7j25wp4D6Px6ztef6JbB9mpyLLryE60Af2U4be24sq6rA7V2 hsh96xcQI+3jveSrcTQ== X-Received: from wmoi16.prod.google.com ([2002:a05:600c:4810:b0:480:4a03:7b7d]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:37c8:b0:480:3b26:82c3 with SMTP id 5b1f17b1804b1-48069c5b93amr56639625e9.20.1769591930915; Wed, 28 Jan 2026 01:18:50 -0800 (PST) Date: Wed, 28 Jan 2026 09:18:49 +0000 In-Reply-To: <20260127235545.2307876-1-cmllamas@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260127235545.2307876-1-cmllamas@google.com> Message-ID: Subject: Re: [PATCH 1/2] rust_binderfs: fix ida_alloc_max() upper bound From: Alice Ryhl To: Carlos Llamas Cc: Greg Kroah-Hartman , "Arve =?utf-8?B?SGrDuG5uZXbDpWc=?=" , Todd Kjos , Christian Brauner , Dmitry Antipov , Al Viro , NeilBrown , Matt Gilbride , Wedson Almeida Filho , Li Li , Paul Moore , kernel-team@android.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel test robot Content-Type: text/plain; charset="utf-8" On Tue, Jan 27, 2026 at 11:55:10PM +0000, Carlos Llamas wrote: > The 'max' argument of ida_alloc_max() takes the maximum valid ID and not > the "count". Using an ID of BINDERFS_MAX_MINOR (1 << 20) for dev->minor > would exceed the limits of minor numbers (20-bits). Fix this off-by-one > error by subtracting 1 from the 'max'. > > Cc: stable@vger.kernel.org > Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver") > Reported-by: kernel test robot > Closes: https://lore.kernel.org/r/202512181203.IOv6IChH-lkp@intel.com/ > Signed-off-by: Carlos Llamas For both patches: Reviewed-by: Alice Ryhl