Re: Possible off-by-one bug in usr.sbin/rad/engine.c

2023-01-01 Thread Rudolf Leitgeb
:33 Uhr > Von: "Alejandro Colomar" > An: "Florian Obser" , "Ingo Schwarze" > Cc: misc@openbsd.org > Betreff: Re: Possible off-by-one bug in usr.sbin/rad/engine.c > > > > On 1/1/23 14:48, Alejandro Colomar wrote: > > Hello Florian, Ingo,

Re: Possible off-by-one bug in usr.sbin/rad/engine.c

2023-01-01 Thread Alejandro Colomar
Hello Rudolf, On 1/1/23 16:59, Rudolf Leitgeb wrote: Coming from a C/C++ background, I would assume, that a range from 200 to 600 comprises numbers would start at 200 and reach as far as 599. This would be in sync with all STL functions for iterating through collections or for extracting ranges.

Re: Possible off-by-one bug in usr.sbin/rad/engine.c

2023-01-01 Thread Alejandro Colomar
On 1/1/23 14:48, Alejandro Colomar wrote: Hello Florian, Ingo, On 1/1/23 08:24, Florian Obser wrote: On 2022-12-31 23:54 +01, Ingo Schwarze wrote: [...] With your change, the timeout could go up to 600.99, i.e. almost 601 seconds.  I don't know the protocol and can't say whether the

Re: Possible off-by-one bug in usr.sbin/rad/engine.c

2023-01-01 Thread Alejandro Colomar
Hello Florian, Ingo, On 1/1/23 08:24, Florian Obser wrote: On 2022-12-31 23:54 +01, Ingo Schwarze wrote: Hi Alejandro, Alejandro Colomar wrote on Sat, Dec 31, 2022 at 05:56:27PM +0100: I've started auditing the OpenBSD source code after the discussion on arc4random_uniform(3) and my suggest

Re: Possible off-by-one bug in usr.sbin/rad/engine.c

2022-12-31 Thread Florian Obser
On 2022-12-31 23:54 +01, Ingo Schwarze wrote: > Hi Alejandro, > > Alejandro Colomar wrote on Sat, Dec 31, 2022 at 05:56:27PM +0100: > >> I've started auditing the OpenBSD source code after the discussion on >> arc4random_uniform(3) and my suggestion of arc4random_range() on the glibc >> mailing

Re: Possible off-by-one bug in usr.sbin/rad/engine.c

2022-12-31 Thread Ingo Schwarze
Hi Alejandro, Alejandro Colomar wrote on Sat, Dec 31, 2022 at 05:56:27PM +0100: > I've started auditing the OpenBSD source code after the discussion on > arc4random_uniform(3) and my suggestion of arc4random_range() on the glibc > mailing list. > > I found some cases where it seems like there'

Possible off-by-one bug in usr.sbin/rad/engine.c

2022-12-31 Thread Alejandro Colomar
Hi Theo and Florian, I've started auditing the OpenBSD source code after the discussion on arc4random_uniform(3) and my suggestion of arc4random_range() on the glibc mailing list. I found some cases where it seems like there's an off-by-one bug, which would be solved by providing arc4random_