public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>,
	Laurent Vivier <lvivier@redhat.com>
Subject: Re: [PATCH v2 4/4] ndp: Use high quality entropy in NDP timer even if not needed
Date: Thu, 16 Jul 2026 16:31:36 +0200 (CEST)	[thread overview]
Message-ID: <20260716163133.229afe23@elisabeth> (raw)
In-Reply-To: <20260716072222.1819811-5-sbrivio@redhat.com>

On Thu, 16 Jul 2026 09:22:22 +0200
Stefano Brivio <sbrivio@redhat.com> wrote:

> ...instead of calling random(), to make static checkers happy.
> 
> I don't think that an attacker could actually gain anything by making
> router advertisement intervals predictable, but a doubt remains, and
> this is cheap enough that we might just want to do this to get rid of
> the noise from static checkers informing us that random() shouldn't be
> used.
> 
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
> ---
> v2: Turn random_part to uint32_t and cast to time_t before using it, to
>     avoid using negative values

Oops, I guess I ran tests at 3/4 of this series but not on this patch,
I'm not quite sure, but now I ran them again and realised that I've
been here, done that, around the time of:

  https://archives.passt.top/passt-dev/20241113091805.6f6e2f6a@elisabeth/

just to find out that this would be the single usage of getrandom(2) at
runtime, and we don't include it in the list of system calls we can
use. Maybe Laurent tried this as well.

Anyway, I guess it's not worth making things actually less secure just
to satisfy Coverity Scan here, so I'll drop this patch.

-- 
Stefano


      parent reply	other threads:[~2026-07-16 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  7:22 [PATCH v2 0/4] Assorted fixes, address a static checker warning Stefano Brivio
2026-07-16  7:22 ` [PATCH v2 1/4] CONTRIBUTING.md: The tag is "Link:", regardless of how many we have Stefano Brivio
2026-07-16  7:22 ` [PATCH v2 2/4] dhcp: Make option parsing more robust, explicitly handle options 0 and 255 Stefano Brivio
2026-07-16  7:30   ` David Gibson
2026-07-16  7:22 ` [PATCH v2 3/4] passt.1, pesto.1: ::1 is an address, not a port Stefano Brivio
2026-07-16  7:22 ` [PATCH v2 4/4] ndp: Use high quality entropy in NDP timer even if not needed Stefano Brivio
2026-07-16  7:34   ` David Gibson
2026-07-16 14:31   ` Stefano Brivio [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=20260716163133.229afe23@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=lvivier@redhat.com \
    --cc=passt-dev@passt.top \
    /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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).