Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2231524/?format=api
{ "id": 2231524, "url": "http://patchwork.ozlabs.org/api/patches/2231524/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/c12f3ec23511933ca93c008a6c2c8f47af20b66a.1777576834.git.massimiliano.pellizzer@canonical.com/", "project": { "id": 15, "url": "http://patchwork.ozlabs.org/api/projects/15/?format=api", "name": "Ubuntu Kernel", "link_name": "ubuntu-kernel", "list_id": "kernel-team.lists.ubuntu.com", "list_email": "kernel-team@lists.ubuntu.com", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<c12f3ec23511933ca93c008a6c2c8f47af20b66a.1777576834.git.massimiliano.pellizzer@canonical.com>", "list_archive_url": null, "date": "2026-04-30T19:28:17", "name": "[SRU,N,v2,6/9] crypto: authencesn - Do not place hiseq at end of dst for out-of-place decryption", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "c4c03c697c00b4effa3b90aac8d78ccc077ac248", "submitter": { "id": 89057, "url": "http://patchwork.ozlabs.org/api/people/89057/?format=api", "name": "Massimiliano Pellizzer", "email": "massimiliano.pellizzer@canonical.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/c12f3ec23511933ca93c008a6c2c8f47af20b66a.1777576834.git.massimiliano.pellizzer@canonical.com/mbox/", "series": [ { "id": 502367, "url": "http://patchwork.ozlabs.org/api/series/502367/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=502367", "date": "2026-04-30T19:28:11", "name": "CVE-2026-31431", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/502367/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2231524/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2231524/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<kernel-team-bounces@lists.ubuntu.com>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (4096-bit key;\n unprotected) header.d=canonical.com header.i=@canonical.com\n header.a=rsa-sha256 header.s=20251003 header.b=rvizOQVW;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com\n (client-ip=185.125.189.65; helo=lists.ubuntu.com;\n envelope-from=kernel-team-bounces@lists.ubuntu.com;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g644L45rRz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 05:29:38 +1000 (AEST)", "from localhost ([127.0.0.1] helo=lists.ubuntu.com)\n\tby lists.ubuntu.com with esmtp (Exim 4.86_2)\n\t(envelope-from <kernel-team-bounces@lists.ubuntu.com>)\n\tid 1wIX4k-0002Nx-Vg; Thu, 30 Apr 2026 19:29:31 +0000", "from smtp-relay-internal-0.internal ([10.131.114.225]\n helo=smtp-relay-internal-0.canonical.com)\n by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.86_2) (envelope-from <massimiliano.pellizzer@canonical.com>)\n id 1wIX4g-00023L-HU\n for kernel-team@lists.ubuntu.com; Thu, 30 Apr 2026 19:29:26 +0000", "from mail-wr1-f71.google.com (mail-wr1-f71.google.com\n [209.85.221.71])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 5C6903FE9F\n for <kernel-team@lists.ubuntu.com>; Thu, 30 Apr 2026 19:29:26 +0000 (UTC)", "by mail-wr1-f71.google.com with SMTP id\n ffacd0b85a97d-43d780757eeso928791f8f.1\n for <kernel-team@lists.ubuntu.com>; Thu, 30 Apr 2026 12:29:26 -0700 (PDT)", "from tuxedo-infinitybook (net-93-71-66-38.cust.vodafonedsl.it.\n [93.71.66.38]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-448e74324a5sm8133217f8f.12.2026.04.30.12.29.24\n for <kernel-team@lists.ubuntu.com>\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 30 Apr 2026 12:29:24 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com;\n s=20251003; t=1777577366;\n bh=1rdjmEgePE1QOmVw7gwoM5e2s07Hse6lOgwfjG9Eh+c=;\n h=From:To:Subject:Date:Message-ID:In-Reply-To:References:\n MIME-Version;\n b=rvizOQVW9BE7S+2cWNJVuZMDmGocrukWNDlUTex9oGew1IvVURstoARYDRq04GobD\n u2nYDkw42p+qluyZEdwblj2j17x5+0xD6Tm7vIJAtO49Aw4M3QSqT3TLzxQn2LQt2V\n kf1aZl5wITNulQzJsb4nQx4JG4fZ39b7BvGsGGvlmSbGljqOEOxWegF+RmrlLJrNNm\n Mgrde98L5rtvBTCwbhGDqBVxiYI/mkBbulFev2rdAeuXn+G90AAW8ekAOmXMXvUr5O\n nADVwBkX20Ul2ZTwUADVTk4ChZSjzNH+gzQA1muVDdXgZVOVOiPWL3OPlHGaFEcvZv\n TuMCg8q4QrqZukR9rB2GZ5w8r+FAd+B3D6AvMAVCZtySmIzNw7MSinF4Spca07z5Qv\n 2xT6yNb3k0sc+yWUVaFeZk+gw2TQ1VyyiHAYUA+y6uyCujy5nzPhErAtLQC7as5w+t\n //j4QT/aKIMhyfXr3+K2o36xSjzIuOP79unpZQpFYyOEgSAZINlRafz0vMua15vk6f\n UxhvfIAuSB4RPUQ9LEXPtqaKhhldUUX86RU/QW8U9oOPOIdBJdlPf/ooQFNt7XNvYr\n zfxai20t6lwLMkE2+e/oQWveC6c5AObri8qzqoAiJ8o3CBHM2WjdZ6aUD2VD8MJeDz\n sKdcJmwtMW+dEtFKSWNT41Hc=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777577366; x=1778182166;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=1rdjmEgePE1QOmVw7gwoM5e2s07Hse6lOgwfjG9Eh+c=;\n b=jbeRfxjH3y0q9DNPGHepxNRq1w84yAHsgvdBNindTsLUn6CxPHZRyJVmrdPk+b4q7m\n EdZO6aiywaM/Iq7pLppWl3zMCinMzZdas8qnxNFRTrOgdI/VDfUz3jMKpnNGjQj8oE/9\n KKDVmFdRqSkUBnKPlIeQ6hnWyjgcMs9JVDdVbC8NCJl4113paBQ7AHt4oKt97QPFemm/\n jHJwbUIfA/YG7tvuKBjJoi5h/FSIbXrZ4j0kSJyYFGu8NnJlnKBYS5QHbd8RTBGodedL\n kF4zIgcKNhV3OQrdEaxwkr5mhkZuTUpnAeG8JOlj6YcvmTaLaOEK9JaLAb3gbZM917il\n uz6w==", "X-Gm-Message-State": "AOJu0YwglNO3h9Am8lfKA2IkRxLXMU3HWPGggXe8Qd4um8Ed7nv0BHhl\n T84HsozN+YXR6VLb1GvAhMeO9mzdnEGq9V/IV5PtrLn2MqsWWHj7Yi7bSFTYGTZaQRINw2AWKwj\n z47IjyIBj7JV/birXLMCWsOR7wOog/z6qF8TAfAZq2Ao7POPdb6ynjcgg9ySveOscHCRI2rj+x6\n 6UccOU7rlMoWNhVw==", "X-Gm-Gg": "AeBDietY+VUFYqqsTFjCD2FZ/mZxZzcwNPuoBoKYdFRgXaXRG52kRzcelvKYKV6wykz\n zs+q0AGaDU602vE19Q9oqvmif2Du+o1qaYZcsuwcaaWEFdpwfBtjVuqdXCX54imQjCzklmP2L9Y\n d+a+3B0u1xgBIiWgo/B/HFfDy88UThm3iOH3F+rj4R1DPw+jHWwc8xYmIu4+RO6XkoNV/EmGubk\n mcQE86tosTPDkcldYjUipcqa3luAB2fh3lzMNP6ZuawB+KO0EaStLiMLLrgAeDT/owzdoBDOvoi\n VrUrtqadLdwOh7iuBYwWcIYrk5+Bm5PEYkjF3pJ/MF0e9ZZrMpMJ6XttPP0TROa+Ui9C9HLu9KD\n ONgD0npE1hHkgatF77k8u+zIS9VBxPS4s1ufLTQiHeEQQ4L4fxAtuYE8pJiQNGPOWkyzre3lIC7\n 7AeLlk9SfdHnaLNp5IQXm1z144ZZwPc+HKiZ9hNrjxn4wBYByvBbUTPHNScsIxA2ZLIPDW3ms0c\n ajQWGjHiwVpqA==", "X-Received": [ "by 2002:a05:6000:1862:b0:43d:779e:afa8 with SMTP id\n ffacd0b85a97d-4494f9a1430mr6932809f8f.16.1777577365688;\n Thu, 30 Apr 2026 12:29:25 -0700 (PDT)", "by 2002:a05:6000:1862:b0:43d:779e:afa8 with SMTP id\n ffacd0b85a97d-4494f9a1430mr6932776f8f.16.1777577365281;\n Thu, 30 Apr 2026 12:29:25 -0700 (PDT)" ], "From": "Massimiliano Pellizzer <massimiliano.pellizzer@canonical.com>", "To": "kernel-team@lists.ubuntu.com", "Subject": "[SRU][N][PATCH v2 6/9] crypto: authencesn - Do not place hiseq at end\n of dst for out-of-place decryption", "Date": "Thu, 30 Apr 2026 21:28:17 +0200", "Message-ID": "\n <c12f3ec23511933ca93c008a6c2c8f47af20b66a.1777576834.git.massimiliano.pellizzer@canonical.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<cover.1777576834.git.massimiliano.pellizzer@canonical.com>", "References": "\n <177757626672.818044.11792928639290212185@tuxedo-infinitybook.public>\n <cover.1777576834.git.massimiliano.pellizzer@canonical.com>", "MIME-Version": "1.0", "X-BeenThere": "kernel-team@lists.ubuntu.com", "X-Mailman-Version": "2.1.20", "Precedence": "list", "List-Id": "Kernel team discussions <kernel-team.lists.ubuntu.com>", "List-Unsubscribe": "<https://lists.ubuntu.com/mailman/options/kernel-team>,\n <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe>", "List-Archive": "<https://lists.ubuntu.com/archives/kernel-team>", "List-Post": "<mailto:kernel-team@lists.ubuntu.com>", "List-Help": "<mailto:kernel-team-request@lists.ubuntu.com?subject=help>", "List-Subscribe": "<https://lists.ubuntu.com/mailman/listinfo/kernel-team>,\n <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "kernel-team-bounces@lists.ubuntu.com", "Sender": "\"kernel-team\" <kernel-team-bounces@lists.ubuntu.com>" }, "content": "From: Herbert Xu <herbert@gondor.apana.org.au>\n\ncommit e02494114ebf7c8b42777c6cd6982f113bfdbec7 upstream.\n\nWhen decrypting data that is not in-place (src != dst), there is\nno need to save the high-order sequence bits in dst as it could\nsimply be re-copied from the source.\n\nHowever, the data to be hashed need to be rearranged accordingly.\n\nReported-by: Taeyang Lee <0wn@theori.io>\nFixes: 104880a6b470 (\"crypto: authencesn - Convert to new AEAD interface\")\nSigned-off-by: Herbert Xu <herbert@gondor.apana.org.au>\nSigned-off-by: Eric Biggers <ebiggers@kernel.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\n(cherry picked from commit 89fe118b6470119b20c04afc36e45b81a69ea11f linux-6.12.y)\nCVE-2026-31431\nSigned-off-by: Massimiliano Pellizzer <massimiliano.pellizzer@canonical.com>\n---\n crypto/authencesn.c | 48 +++++++++++++++++++++++++++------------------\n 1 file changed, 29 insertions(+), 19 deletions(-)", "diff": "diff --git a/crypto/authencesn.c b/crypto/authencesn.c\nindex a5fbb638d9d7..257af38ac4de 100644\n--- a/crypto/authencesn.c\n+++ b/crypto/authencesn.c\n@@ -207,6 +207,7 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,\n \tu8 *ohash = areq_ctx->tail;\n \tunsigned int cryptlen = req->cryptlen - authsize;\n \tunsigned int assoclen = req->assoclen;\n+\tstruct scatterlist *src = req->src;\n \tstruct scatterlist *dst = req->dst;\n \tu8 *ihash = ohash + crypto_ahash_digestsize(auth);\n \tu32 tmp[2];\n@@ -214,23 +215,27 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,\n \tif (!authsize)\n \t\tgoto decrypt;\n \n-\t/* Move high-order bits of sequence number back. */\n-\tscatterwalk_map_and_copy(tmp, dst, 4, 4, 0);\n-\tscatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0);\n-\tscatterwalk_map_and_copy(tmp, dst, 0, 8, 1);\n+\tif (src == dst) {\n+\t\t/* Move high-order bits of sequence number back. */\n+\t\tscatterwalk_map_and_copy(tmp, dst, 4, 4, 0);\n+\t\tscatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0);\n+\t\tscatterwalk_map_and_copy(tmp, dst, 0, 8, 1);\n+\t} else\n+\t\tmemcpy_sglist(dst, src, assoclen);\n \n \tif (crypto_memneq(ihash, ohash, authsize))\n \t\treturn -EBADMSG;\n \n decrypt:\n \n-\tsg_init_table(areq_ctx->dst, 2);\n+\tif (src != dst)\n+\t\tsrc = scatterwalk_ffwd(areq_ctx->src, src, assoclen);\n \tdst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen);\n \n \tskcipher_request_set_tfm(skreq, ctx->enc);\n \tskcipher_request_set_callback(skreq, flags,\n \t\t\t\t req->base.complete, req->base.data);\n-\tskcipher_request_set_crypt(skreq, dst, dst, cryptlen, req->iv);\n+\tskcipher_request_set_crypt(skreq, src, dst, cryptlen, req->iv);\n \n \treturn crypto_skcipher_decrypt(skreq);\n }\n@@ -255,6 +260,7 @@ static int crypto_authenc_esn_decrypt(struct aead_request *req)\n \tunsigned int assoclen = req->assoclen;\n \tunsigned int cryptlen = req->cryptlen;\n \tu8 *ihash = ohash + crypto_ahash_digestsize(auth);\n+\tstruct scatterlist *src = req->src;\n \tstruct scatterlist *dst = req->dst;\n \tu32 tmp[2];\n \tint err;\n@@ -262,24 +268,28 @@ static int crypto_authenc_esn_decrypt(struct aead_request *req)\n \tif (assoclen < 8)\n \t\treturn -EINVAL;\n \n-\tcryptlen -= authsize;\n-\n-\tif (req->src != dst)\n-\t\tmemcpy_sglist(dst, req->src, assoclen + cryptlen);\n+\tif (!authsize)\n+\t\tgoto tail;\n \n+\tcryptlen -= authsize;\n \tscatterwalk_map_and_copy(ihash, req->src, assoclen + cryptlen,\n \t\t\t\t authsize, 0);\n \n-\tif (!authsize)\n-\t\tgoto tail;\n-\n \t/* Move high-order bits of sequence number to the end. */\n-\tscatterwalk_map_and_copy(tmp, dst, 0, 8, 0);\n-\tscatterwalk_map_and_copy(tmp, dst, 4, 4, 1);\n-\tscatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 1);\n-\n-\tsg_init_table(areq_ctx->dst, 2);\n-\tdst = scatterwalk_ffwd(areq_ctx->dst, dst, 4);\n+\tscatterwalk_map_and_copy(tmp, src, 0, 8, 0);\n+\tif (src == dst) {\n+\t\tscatterwalk_map_and_copy(tmp, dst, 4, 4, 1);\n+\t\tscatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 1);\n+\t\tdst = scatterwalk_ffwd(areq_ctx->dst, dst, 4);\n+\t} else {\n+\t\tscatterwalk_map_and_copy(tmp, dst, 0, 4, 1);\n+\t\tscatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen - 4, 4, 1);\n+\n+\t\tsrc = scatterwalk_ffwd(areq_ctx->src, src, 8);\n+\t\tdst = scatterwalk_ffwd(areq_ctx->dst, dst, 4);\n+\t\tmemcpy_sglist(dst, src, assoclen + cryptlen - 8);\n+\t\tdst = req->dst;\n+\t}\n \n \tahash_request_set_tfm(ahreq, auth);\n \tahash_request_set_crypt(ahreq, dst, ohash, assoclen + cryptlen);\n", "prefixes": [ "SRU", "N", "v2", "6/9" ] }