lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250821000743.0679c8cc8b41d0c9821c7727@uniroma2.it>
Date: Thu, 21 Aug 2025 00:07:43 +0200
From: Andrea Mayer <andrea.mayer@...roma2.it>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Eric Biggers <ebiggers@...nel.org>, netdev@...r.kernel.org,
        David Ahern
 <dsahern@...il.com>, David Lebrun <dlebrun@...gle.com>,
        Paolo Lungaroni
 <paolo.lungaroni@...roma2.it>,
        stefano.salsano@...roma2.it, Andrea Mayer
 <andrea.mayer@...roma2.it>
Subject: Re: [PATCH iproute2-next v2] man8: ip-sr: Document that passphrase
 must be high-entropy

On Wed, 20 Aug 2025 12:54:58 -0700
Stephen Hemminger <stephen@...workplumber.org> wrote:

> On Wed, 20 Aug 2025 11:43:17 -0700
> Eric Biggers <ebiggers@...nel.org> wrote:
> 
> > On Wed, Aug 20, 2025 at 09:25:35AM -0700, Stephen Hemminger wrote:
> > > On Fri, 15 Aug 2025 20:18:46 -0700
> > > Eric Biggers <ebiggers@...nel.org> wrote:
> > >   
> > > > diff --git a/man/man8/ip-sr.8 b/man/man8/ip-sr.8
> > > > index 6be1cc54..cd8c5d18 100644
> > > > --- a/man/man8/ip-sr.8
> > > > +++ b/man/man8/ip-sr.8
> > > > @@ -1,6 +1,6 @@
> > > > -.TH IP\-SR 8 "14 Apr 2017" "iproute2" "Linux"
> > > > +.TH IP\-SR 8 "15 Aug 2025" "iproute2" "Linux"  
> > > 
> > > NAK - do not change man page date for each change.  
> > 
> > Sure, if that's the convention for this project.  Note that this differs
> > from the convention used by most projects with dated man pages.  The
> > purpose of the date is normally to indicate how fresh the man page is.
> > 
> > > >  .SH "NAME"
> > > >  ip-sr \- IPv6 Segment Routing management
> > > >  .SH SYNOPSIS
> > > >  .sp
> > > >  .ad l
> > > > @@ -32,13 +32,21 @@ internal parameters.
> > > >  .PP
> > > >  Those parameters include the mapping between an HMAC key ID and its associated
> > > >  hashing algorithm and secret, and the IPv6 address to use as source for encapsulated
> > > >  packets.
> > > >  .PP
> > > > -The \fBip sr hmac set\fR command prompts for a passphrase that will be used as the
> > > > -HMAC secret for the corresponding key ID. A blank passphrase removes the mapping.
> > > > -The currently supported algorithms for \fIALGO\fR are \fBsha1\fR and \fBsha256\fR.
> > > > +The \fBip sr hmac set\fR command prompts for a newline-terminated "passphrase"  
> > > 
> > > That implies that newline is part of the pass phrase.  
> > 
> > Not really.  "NUL-terminated" strings don't include the NUL in the
> > string content.  If you prefer, it could be made explicit as follows:
> > 
> >     The \fBip sr hmac set\fR command prompts for a "passphrase" that
> >     will be used as the HMAC secret for the corresponding key ID. The
> >     passphrase is terminated by a newline, but the terminating newline
> >     is not included in the resulting passphrase.
> > 
> > But I don't think it's very useful, as it's not needed to know how to
> > use the command correctly.
> > 
> > > The code to read password is using getpass() which is marked as obsolete
> > > in glibc. readpassphrase is preferred.  
> > 
> > Is that relevant to this documentation patch?
> > 
> > > > +that will be used as the HMAC secret for th
> 
> Since this is only part of iproute2 that uses getpass() probably should
> be rethought. Having key come from terminal seems hard to script
> and awkward.

Hi Stephen,

Recently, I started working on implementing some self-tests for SRv6 on HMAC.
The command:

  ip sr hmac set <keyid> <algo>

uses getpass() internally, as you mentioned earlier, which can be inconvenient
for automation.

To address this, Paolo Lungaroni has extended the command to support an
additional parameter called "secret" (this is within our internal fork of
iproute2):

  ip sr hmac set 17 sha1 secret <your-secret>

This enhancement allows the secret to be specified directly on the command
line, making it much more convenient for scripting and automated testing
environments.
If the "secret" parameter is not provided, the command will continue to behave
as before, prompting for the passphrase interactively (i.e., the legacy
behavior; we haven't modified the getpass() function, but we can consider to
update it).

If you're interested, I can reach out to Paolo Lungaroni, the author of this
patchset, tomorrow morning (CEST) and ask him to prepare everything for
submission, including updates to the man page.

Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ