From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender-of-o58.zoho.eu (sender-of-o58.zoho.eu [136.143.169.58]) (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 E96EB3783C8 for ; Tue, 24 Mar 2026 22:24:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.58 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774391086; cv=pass; b=LAqYm/dRLX0TD0FcevQSjLsqnAxTxCu0kGvzuagvnMmM+8oCTz92EjvqkA37Lun7fQei+X/xviBeerfamz5IGw0opUh2Mhm+g5MnaFdb4cVUYcR2EEuM/APsNx8S8EFqTX7X2dGA3Hf06258Cr45KWzjz+D2YQK8YDY92MfITkY= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774391086; c=relaxed/simple; bh=AWuwfM9gpwJzZrQMifPiii+fwHjAUH7QfR4TgYHOGaE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=IrMPXrjn57DVQqEHvwlkdAogc4J5nxh5Kw1oBDg5hxu7doRoA0UtedAPAKwe4V4SH/JX9uPLNObz08kltnuO660ohN1soInNWZ5h9GhvDkFVy1i2ZkzXv9Hi6yaztv9mWH4lxKxQxmkxpiMnFBmpsF2lzsogKfUHxtKCvdB9Pjs= 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=hDZWYhcg; arc=pass smtp.client-ip=136.143.169.58 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="hDZWYhcg" ARC-Seal: i=1; a=rsa-sha256; t=1774391082; cv=none; d=zohomail.eu; s=zohoarc; b=b13Y9R/g1oSORgwQpKFQPI8RyIjxlbIgUH1b39CODdXE2x4VvNI18ySaRvy02xbvHrcy2VYnJVqrD62Of07SnKACetVsi6/7cUpS1J7yTkqbRKYBg5YAuYtxrBIc651lGWksvS7ZtcWwxAd9VFCwZ/cDACb3AJTyj+w/eB+XCyI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1774391082; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=iP9XtScDN46Amjyq7eN5x8F5hdHvUwOK8wLAY85eyHo=; b=SKIQko6prH0R54BxCmy9cUeGiMI9WFzKkEEYaeaoskEFtWSF8fuuQ/IwMnzr7sBGssg8/kq/7XyK3rNEVCDASjxcK8goosvMR8mDWIGeDMprGQx9inNPsdyj/GmZtQIZncJonp+RZ7A1TkOgZATkQ4G0t5989dAQLeeBHKD10z8= 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=1774391082; 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=iP9XtScDN46Amjyq7eN5x8F5hdHvUwOK8wLAY85eyHo=; b=hDZWYhcgcZIuAwpZRx9N6ckn75Amnugu4obfIAAJm2vHsjhpiCfuH5g+OaIshw6V b+2YK3R4QiCouhUS8qZT7LufGx7OrK1Si79FAj0gTgoIYiDCv46FfFVY1aAN7yVLTxO XSe0B6FeR4AwKx7pOcW85YcyR0h3Kt8gTSU42Erg= Received: by mx.zoho.eu with SMTPS id 1774391081063747.5677396323304; Tue, 24 Mar 2026 23:24:41 +0100 (CET) From: Josh Law To: Andrew Morton Cc: Josh Law , linux-kernel@vger.kernel.org Subject: [PATCH 0/2] lib/base64: decode fixes Date: Tue, 24 Mar 2026 22:24:37 +0000 Message-Id: <20260324222439.46028-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. 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