Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2231269/?format=api
{ "id": 2231269, "url": "http://patchwork.ozlabs.org/api/patches/2231269/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/46a8ba5dd3ed03716a291928d71b1df3ba7fbcda.1777552173.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": "<46a8ba5dd3ed03716a291928d71b1df3ba7fbcda.1777552173.git.massimiliano.pellizzer@canonical.com>", "list_archive_url": null, "date": "2026-04-30T12:30:34", "name": "[SRU,J,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": "1f476bf7ddf63e3d800b3b8fa2e1a1b13efe2291", "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/46a8ba5dd3ed03716a291928d71b1df3ba7fbcda.1777552173.git.massimiliano.pellizzer@canonical.com/mbox/", "series": [ { "id": 502300, "url": "http://patchwork.ozlabs.org/api/series/502300/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=502300", "date": "2026-04-30T12:30:28", "name": "CVE-2026-31431", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502300/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2231269/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2231269/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=Tr1rsM9u;\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 4g5tpX1blzz1yGq\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 22:32:04 +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 1wIQYe-0006MK-13; Thu, 30 Apr 2026 12:31:56 +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 1wIQYL-0005Ak-It\n for kernel-team@lists.ubuntu.com; Thu, 30 Apr 2026 12:31:37 +0000", "from mail-wm1-f69.google.com (mail-wm1-f69.google.com\n [209.85.128.69])\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 1B62C3F57D\n for <kernel-team@lists.ubuntu.com>; Thu, 30 Apr 2026 12:31:37 +0000 (UTC)", "by mail-wm1-f69.google.com with SMTP id\n 5b1f17b1804b1-4837b6f6b93so9735235e9.3\n for <kernel-team@lists.ubuntu.com>; Thu, 30 Apr 2026 05:31:37 -0700 (PDT)", "from tuxedo-infinitybook.ts.net\n (net-93-71-66-38.cust.vodafonedsl.it. [93.71.66.38])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-48a81ed6bafsm103695005e9.2.2026.04.30.05.31.34\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 05:31:35 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com;\n s=20251003; t=1777552297;\n bh=zv/xA4Xg40pJ8bhRyOmk1kj8YlFDvaSewsolM+7nexQ=;\n h=From:To:Subject:Date:Message-ID:In-Reply-To:References:\n MIME-Version;\n b=Tr1rsM9u0tRGFkMV29A3oV2Ah7r6ILui/YGhaB4DdYxHaNgXngShZX+C9MxsLdUh4\n DwZQWgG+jSKk+d3gDe866Xunax2bmJqOidlvIFGB1QHE/ntGy8vFlaCmtYk8lDun42\n kK9PjVJISVPptDdpdnZVNxIvsFRfNxurDvaIMXbfjAktSmaHHsD3qSqKKt3lsgAU6g\n qB6gYTQIS/32RYswekvxWmBnuRM6Mho68rEen52y/UF0M8nYPsJOPGl0apB88uZjkk\n z9FIyUQpbQxAbWMEskQVO6go0Hhfq1BtCZC++yNzYyknHUfF/cf1J1gsPaIe4jHsA6\n oXfGXxzhPePaOvkuqRDOjNkehENFXu7gl0YaWwK5wgzEfByUlaeO93A8sMuRQip0tW\n 0lxYiaMAM6BqMd3Gs8nvEpALcNGHqUoJQvM2Wa76aKNNuBhozuOEPevIwSMXxiREP0\n EyxTY3MZNuLW5cIKUlauIWJ05Mc28+tHA8rD5oaMeT+u7PEr4tq+AvqWSCZ0rlr7Ky\n RNnDMGACcsnxVQQ/fztJF+nmSh3/euKfCticcIQw+uqbIOoAEegatq0uDP39WBMZXc\n CBcw0SjQc6C6SahH94AvYUySHmxTY9vpj7UqszRG19D82KzPpn264S2kTdTayqHO2Z\n wjgh6gXzX+wBvsyHHPYugIxo=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777552296; x=1778157096;\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=zv/xA4Xg40pJ8bhRyOmk1kj8YlFDvaSewsolM+7nexQ=;\n b=Xw1vUR0aW5Ivdt8F/JBkhEriVZntDdFfecLxXwWF77GVuUIyqum9nmdPHchnuJhbRX\n fVv6PiBccLH8lYnJTKccggjIoTgdZn5rCVgtgNinc80iZzxoIdCPGS/NJwCdp4gOx8Jn\n zmrfFvt1E02ClDhNxtj7tBQIeMUJInZTpOL8L7946DxlRDITXQbeksd52hxcHv9/GCmx\n 0j3/peiavgrUIixo6Hu43XY7SoSTETiB/E7LT7XpPYQYtHVGKXH3/c/po+U8QqGFZbn8\n yhsYFxKteDQ0coUGeXIKPobaAbccK55K0atEVlEy+deuqbiU47NgqEMjX/sp0pfYFclD\n 15TA==", "X-Gm-Message-State": "AOJu0YwkIqxWOaO96deozAkwKCXmNzSzty/HGcae1DDxgrNNnjaK4DFr\n G5zeJEW5uMb/Z7hnPrZY4CBNdtsGZLmjSGuTbBU0g6lOKoWu1Vgi9gwNkIYcO5VCKEr4FU+ll4K\n JUyPqYczrfs3TDyVX1DSfz450yoHMJGYFb0wKygqolWcvmHu/55ede48LftyWQmJhH7SPNvCHIn\n EU+wcFrwqC7mRIxg==", "X-Gm-Gg": "AeBDiesoKJbS9hlH4Q6Bpt+eBYzc+VN5nqLaZ25qjJzCbEp85qgivd4FEdR4gKfGJId\n /y+9xuwBUwaWtuXAtq3OYbP/eIOETwuI8Cot+QlNaYiNnMMxGuQW9dyFF+U0jRbx5Ni3CzJMXNk\n nNjQkU1CS/QxhMQObdp548qM8q96mCmzMr64RyiAu2jICf6xLD5Kl5PeZOlOT2ZOsmoqZHR+mZ0\n IfO0HUcOGAikGc83XZtCI2TEbjMPoJ0lYmnFEHbFG1dRcG9uisTxkCLn08QXtYlO6+waXIDd+wa\n dgNEtE6rXquCR0uX3JSBROLhvpnfKzctq1Sn3WthdOJzQXM3tCr7GKz6cBTXS3ZP2VMAVr66LV8\n fmm+kGtmeqhibYScWGyaFIvSteJbiPrjNaeg7JUM4/Xa1p8NamiPPWPt+KIOIPymnrWj6HzXZrS\n 6VxuCBh+Idi2HrO5pBWNMOPBQmOaoVRHfgbLs3VW6Rf2V8vbIWnIbJxiY6hMtMsSjPzi+YNOwBf\n HbmxeVlAj53KoEAbLG49lA=", "X-Received": [ "by 2002:a05:600c:6285:b0:48a:75b9:b0bc with SMTP id\n 5b1f17b1804b1-48a8448564cmr53151205e9.29.1777552296195;\n Thu, 30 Apr 2026 05:31:36 -0700 (PDT)", "by 2002:a05:600c:6285:b0:48a:75b9:b0bc with SMTP id\n 5b1f17b1804b1-48a8448564cmr53150565e9.29.1777552295589;\n Thu, 30 Apr 2026 05:31:35 -0700 (PDT)" ], "From": "Massimiliano Pellizzer <massimiliano.pellizzer@canonical.com>", "To": "kernel-team@lists.ubuntu.com", "Subject": "[SRU][J][PATCH 6/9] crypto: authencesn - Do not place hiseq at end of\n dst for out-of-place decryption", "Date": "Thu, 30 Apr 2026 14:30:34 +0200", "Message-ID": "\n <46a8ba5dd3ed03716a291928d71b1df3ba7fbcda.1777552173.git.massimiliano.pellizzer@canonical.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<cover.1777552173.git.massimiliano.pellizzer@canonical.com>", "References": "\n <177754965576.503496.12142658280614619991@tuxedo-infinitybook.public>\n <cover.1777552173.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 d589abd8b019b07075fda255ceab8c8e950cdb3f linux-5.15.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 fceee6d67d34c..5dc057cb0cdf1 100644\n--- a/crypto/authencesn.c\n+++ b/crypto/authencesn.c\n@@ -214,6 +214,7 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,\n \t\t\t crypto_ahash_alignmask(auth) + 1);\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@@ -221,23 +222,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@@ -264,6 +269,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@@ -271,24 +277,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", "J", "6/9" ] }