From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender-of-o59.zoho.eu (sender-of-o59.zoho.eu [136.143.169.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3D2E1DEFE8 for ; Tue, 24 Mar 2026 22:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.59 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774391537; cv=pass; b=hvWnonQTH/FP3GHT6IiV+yR+Lk+24i6fto+jkgbY+sTg7Ymo7hj8g+yhMhO/BwbdZqYXFim5cosHLEfSqiUoIJ+SYzUL6w8KoLE8KTO22HHFAAS1KbUoAF/kSfQ+e50x+bBiYMwCHfvT0ifwLpktb+QFhI6zcgQtVFM5jj6A5Rg= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774391537; c=relaxed/simple; bh=Otu7HgcvbOwHx3ut4oj5BAff5Gg21a4Dq0ET2n9Nab8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=s9gWmxfB+/sxINwhwEoEVtQVcZXmSGNeAl4vVGo/qAwW5LZAKZcOguy3EJqHvzWl/8lWyfm5nPJfHvhawOEWIGye9YW9mXSV+XNlxc02DQkqU56OttIhfdPtEBnaI4TCqT14EFYeQ0d5ZzUpCg/lMXIqcMWszr+eB7m5uqX0pvQ= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=cGZTZ/5t; arc=pass smtp.client-ip=136.143.169.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="cGZTZ/5t" ARC-Seal: i=1; a=rsa-sha256; t=1774391533; cv=none; d=zohomail.eu; s=zohoarc; b=eGq93GEigExG/3xNhKThmJ6bWwPftsxeHrjr0I1GXpZktHfKcL5P6O9Ja6+03BT9LwsmWvcdZJvYFVHczm7PXMi8TxRV1FsIHn7lSa1RyJ12I+/yCwCRecsDIswE/msWo9ug9OAIdUn13g5Jun4c8/UylQ3xNC0TICg3L0pzI1M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1774391533; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=fjvd7RfMMwi7hCOTkasKIvLpyPOX4fTtnwdB92apvJQ=; b=KF7ix9JplVwfTtWwNsAVC/NF2wx7a7A8aSi0tuzMw94kIvRpuNPTpFB+5S2vqdUFoibkJfl0iC4DAwV6qVLZLlrBaCJYZDRxrQ0o87BcmfAdaoCeSrbFZIU/BmlunXgcpcBMYxPmvYL9VwaUq1cNrHnxKjXjtQ+Rb5Zcttm+7DU= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1774391533; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=fjvd7RfMMwi7hCOTkasKIvLpyPOX4fTtnwdB92apvJQ=; b=cGZTZ/5tF4Jv+orhM0QVbgWVdr5wwBDZuLZFBBKpfihratOnaHgTQW6yzOLTGoVQ Uq9pG6WoWMMCbtngUmce15QH6TLrr5VmfRe1RQmJJ74q6shjnp+ZCjfFNdr6ULeaG2e eLA3sKID1JmZSjsL7lGJRGZjJC3DdOf4L0HXlw/A= Received: by mx.zoho.eu with SMTPS id 1774391531381119.82355568113655; Tue, 24 Mar 2026 23:32:11 +0100 (CET) From: Josh Law To: Andrew Morton Cc: Josh Law , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] lib/base64: decode fixes Date: Tue, 24 Mar 2026 22:32:08 +0000 Message-Id: <20260324223210.47676-1-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External Two small fixes for lib/base64.c: 1. base64_decode() writes a decoded byte to the output buffer before validating the input in the trailing-bytes path. Move the validity checks before any writes so dst is untouched on invalid input. 2. The @padding kernel-doc for base64_decode() was copy-pasted from base64_encode() and describes the wrong direction. v2: fix bogus Fixes tag in patch 1 Josh Law (2): lib/base64: validate before writing in decode tail path lib/base64: fix copy-pasted @padding doc in base64_decode() lib/base64.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.34.1