Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2231531/?format=api
{ "id": 2231531, "url": "http://patchwork.ozlabs.org/api/patches/2231531/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/46a8ba5dd3ed03716a291928d71b1df3ba7fbcda.1777577013.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.1777577013.git.massimiliano.pellizzer@canonical.com>", "list_archive_url": null, "date": "2026-04-30T19:28:27", "name": "[SRU,J,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": "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.1777577013.git.massimiliano.pellizzer@canonical.com/mbox/", "series": [ { "id": 502366, "url": "http://patchwork.ozlabs.org/api/series/502366/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=502366", "date": "2026-04-30T19:28:03", "name": "CVE-2026-31431", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/502366/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2231531/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2231531/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=Ux4NnlJ0;\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 4g644d5fFhz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 05:29:53 +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 1wIX50-0003WE-Ay; Thu, 30 Apr 2026 19:29:46 +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 1wIX4o-0002dV-JN\n for kernel-team@lists.ubuntu.com; Thu, 30 Apr 2026 19:29:34 +0000", "from mail-wr1-f70.google.com (mail-wr1-f70.google.com\n [209.85.221.70])\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 1969E3FEA3\n for <kernel-team@lists.ubuntu.com>; Thu, 30 Apr 2026 19:29:34 +0000 (UTC)", "by mail-wr1-f70.google.com with SMTP id\n ffacd0b85a97d-43d780757eeso928832f8f.1\n for <kernel-team@lists.ubuntu.com>; Thu, 30 Apr 2026 12:29:34 -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.32\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:32 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com;\n s=20251003; t=1777577374;\n bh=zv/xA4Xg40pJ8bhRyOmk1kj8YlFDvaSewsolM+7nexQ=;\n h=From:To:Subject:Date:Message-ID:In-Reply-To:References:\n MIME-Version;\n b=Ux4NnlJ0Dm6FE2i6jGsO/YEm5Ghkr+aqoVS1hyL1DdEVFtGwOv4hWNquk0LzZFTVY\n e8/JpjybxyZJ3jqrkv9uvtKF0LJ7PujmqMD/0Wfj6VSQsF1Pkn0AzugmG2MM4W3+dH\n YcpV0OQIDkcaWV5HEoo8hVTgr4koxrNgrlcs+xe8osYYke7rnSaW41KAz5VWcRGU0G\n E8KdOvsKGwePB85m05s7Z9+0excyYDahH3kViQ4QaRrVIcKyRonMEqULOr3VzJifzU\n qOh8ujftSow434qfOyIEjyWMOSGo7T/9uE6V7S/VBAIcXfEZlNjtaMvL9a491BZaaE\n vynaUkL0CgLaVN7jt4q2gceLcQOo7AX5ZHJCFploPuil9pRC5eFAKMyDY2tKtDFkbp\n EP98K2Ds6GVhDOI03FjZDcIsVdv6ACUjyUH3RI1BUKfzVCyWo9Y/i5Vhmy3ZFHRFtj\n QTFYnqroFguFvCJa7O5qs+FLXxXxMnfho8k0jXYh4L33ht1yIP369QgzWZgvMk808I\n I+TnD/XZ/CqWSA4zX3YvbG+utATs2FpZ3DqpLzgnYg4atYMp4PKV0pcyUF6JOOuL0i\n aKTQgCedmEYOZWXMw9SPVcPGZm2LpSaecf10aAKb7jhKN0uNMp3ognJdZakjHVGs0E\n 52Gn7xxoYMisPLfdN5B/+ph0=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777577373; x=1778182173;\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=k2x80OQsFY7kMlrejzdqaUjrRAFTbM1v19cdPSSgzlt+etxXQxOTcucgQGY3khEGsh\n mKZVlBGyLcEHLB7uHxkdJxJIEYQwn4uJW6miCWPAuYX+uqQBF4bZQauKPddGW9dE/unA\n qyFRQW10DJEwxSFF7XaIK0Mb2SeRZ1ErqD5Ju/ayTaiQ7oI0JyzP7g1CgLfannVaLj5Y\n 1KU1hFrAnwOiIUe2g8ilqXL2UwXIicdY1hIudosqQg979NRkU6x7//zJ2lAngy4YFDDg\n VHJc6Vgia/sc381qFVu4sCEfcZv3l0Uzve4tgLng3csJe/ArL/7AfuCcvSGo+5m+APlO\n 6F/A==", "X-Gm-Message-State": "AOJu0Yz2S1a2EVi3/YwfoTCK+zAFz7M0ojRcrPaPbS4NcUM5nXAnVnFR\n d+aPS/HOJnYNEidt94xnBqUTJg389ltGLiFPHbd0ZMeiXJqcvhnIq5NhwneSc/URre92SL3K5Cc\n hvh6uwNFMvIHbvaMRMrdi151n41pBF8+qVFXdUiLVu2esCUsz3qFQalMsvp7DA/lMjrv6rsP0kb\n EBVMuRsNM4WhZzpA==", "X-Gm-Gg": "AeBDiesEjOfAxpmbkP5bhPFH6wd3l0Ucd91urvys6osCDa2MaZt1/SqOU/ns8+nS9ZP\n b6tt0D/15ASTBXNjbH3CX1FkU8Oes0hXR8UUm3HNwRgLtj1ICQxB0qw898ztt8Nqka2jxielwqK\n o/ktS8flwhe9qY3Ki3MZvj6StAKexPKVfy7zB3brRjBomnz0AQnBZV7sI/d+AwnfhtC+w20SDXP\n CK+y7CjF6nDYcfGm7ZZcovCZZ9oZFTDycP48UlfP0kV8GuIBdSLcgG2uAwFwS6r65IftEJVnB6r\n /0FMcBsOWKlnzWluQZrzyLnUpA0Ql7uHbHGBKd3CBgXYNh/7aGJ3XW8TKbmtst6tjgq6303j8FI\n Fh/n+9YJNyp9JOhAHzEESyztkVWgWBeYrM2a1Lpb2m63krQW2ZGPuDRNhS3SLvCQm8dTK4Imwug\n wHTQO7itKL34dogxH/AQdKxtjCNhJl88EWfIt9h/0fXswpvPdjJiWjum3KLy4+iyU02ds+t1H5T\n V7w51f11kN7DA==", "X-Received": [ "by 2002:a05:6000:26cd:b0:43e:531f:720c with SMTP id\n ffacd0b85a97d-4494eecdc69mr6828676f8f.11.1777577373351;\n Thu, 30 Apr 2026 12:29:33 -0700 (PDT)", "by 2002:a05:6000:26cd:b0:43e:531f:720c with SMTP id\n ffacd0b85a97d-4494eecdc69mr6828638f8f.11.1777577372750;\n Thu, 30 Apr 2026 12:29:32 -0700 (PDT)" ], "From": "Massimiliano Pellizzer <massimiliano.pellizzer@canonical.com>", "To": "kernel-team@lists.ubuntu.com", "Subject": "[SRU][J][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:27 +0200", "Message-ID": "\n <46a8ba5dd3ed03716a291928d71b1df3ba7fbcda.1777577013.git.massimiliano.pellizzer@canonical.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<cover.1777577013.git.massimiliano.pellizzer@canonical.com>", "References": "\n <177757626672.818044.11792928639290212185@tuxedo-infinitybook.public>\n <cover.1777577013.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", "v2", "6/9" ] }