Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Stephen Bertram <sbertram@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] crypto/af_alg09: Test CVE-2026-52972
Date: Sat, 14 Nov 2026 00:03:24 +0000	[thread overview]
Message-ID: <20261114000324.4189-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20261113194640.2925318-1-sbertram@redhat.com>

Hi Stephen,

On Fri Nov 13 14:46:30 2026 -0500, Stephen Bertram <sbertram@redhat.com> wrote:
> crypto/af_alg09: Test CVE-2026-52972

> diff --git a/runtest/crypto b/runtest/crypto
> index a8330db9f..082b906c1 100644
> --- a/runtest/crypto
> +++ b/runtest/crypto
> @@ -6,6 +6,7 @@ af_alg05 af_alg05
>  af_alg06 af_alg06
>  af_alg07 af_alg07
>  af_alg08 af_alg08
> +af_alg09 af_alg09

Please also add a "cve-2026-52972 af_alg09" entry to runtest/cve, matching
the other CVE regression tests in this directory.

> +/*\
> + * Test for CVE-2026-52972.
> + *
> + * [Description]

Remove the deprecated [Description] header from the documentation comment
block.

> +static void run(void)
> +{
> +	static const uint32_t assoclens[] = {
> +		0x7fffffff,
> +		ASSOCLEN_LIMIT,
> +		0xffffffff,
> +	};
> +	size_t i;
> +	int reqfd;
> +
> +	for (i = 0; i < ARRAY_SIZE(assoclens); i++) {
> +		reqfd = tst_alg_accept(algfd);
> +
> +		TEST(send_assoclen(reqfd, assoclens[i]));
> +
> +		if (assoclens[i] < ASSOCLEN_LIMIT) {
> +			if (TST_RET == SEND_SIZE) {
> +				tst_res(TPASS, "sendmsg() accepted assoclen=%#x",
> +					assoclens[i]);
> +			} else if (TST_RET < 0) {
> +				tst_res(TFAIL | TTERRNO,
> +					"sendmsg() failed for valid assoclen=%#x",
> +					assoclens[i]);
> +			} else {
> +				tst_res(TFAIL,
> +					"sendmsg() returned %ld for valid assoclen=%#x",
> +					TST_RET, assoclens[i]);
> +			}
> +		} else if (TST_RET >= 0) {
> +			tst_res(TFAIL, "sendmsg() accepted assoclen=%#x",
> +				assoclens[i]);
> +		} else if (TST_ERR != EINVAL) {
> +			tst_res(TFAIL | TTERRNO,
> +				"sendmsg() failed for assoclen=%#x with unexpected error",
> +				assoclens[i]);
> +		} else {
> +			tst_res(TPASS, "sendmsg() rejected assoclen=%#x with EINVAL",
> +				assoclens[i]);
> +		}
> +
> +		SAFE_CLOSE(reqfd);
> +	}
> +}

Move assoclens[] to file scope and use .test = run with .tcnt =
ARRAY_SIZE(assoclens) in struct tst_test instead of looping inside
.test_all. Replace the manual TEST() and if/else result checks with
TST_EXP_VAL(send_assoclen(reqfd, assoclens[i]), SEND_SIZE, ...) for the
valid length and TST_EXP_FAIL2(send_assoclen(reqfd, assoclens[i]), EINVAL,
...) for the rejected lengths.

Verdict - Needs revision

---
Note:

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2026-11-14  0:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 19:46 [LTP] [PATCH v1] crypto/af_alg09: Test CVE-2026-52972 Stephen Bertram via ltp
2026-11-14  0:03 ` linuxtestproject.agent [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261114000324.4189-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=ltp@lists.linux.it \
    --cc=sbertram@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox