Re: iked bug: root privileges required unnecessarily in configtest mode (-n)

2024-12-26 Thread Kirill A . Korinsky
On Thu, 26 Dec 2024 17:29:30 +0100, Stuart Henderson wrote: > > Diff that can be applied with patch: > (I added optional braces as it's multi line and I think clearer > like that). > > ok? > Doesn't a user who runs validation need access to the keys in /etc/iked/private? > > Index: iked.c > =

Re: iked bug: incorrectly prints policy requests for configuration payloads

2024-12-26 Thread Stuart Henderson
On 2024/12/26 10:50, William Rusnack wrote: > >Synopsis:When printing the parsed policy iked erroneously prints config > >when it should print request. > >Category:bin > >Description: > The below example iked.conf has a request configuration payload. > ```iked.conf > ikev

Re: iked(8): Undocumented -I and -P cli options

2024-12-26 Thread Stuart Henderson
On 2024/12/26 10:52, William Rusnack wrote: > >Synopsis: The iked cli arg parser accepts the -I and -P options with no > >documentation in iked(8) or in the src itself as to what these flags do. > >Category: bin > >Description: > iked supports two undocumented flags, -I and -P, that appear t

Re: iked bug: root privileges required unnecessarily in configtest mode (-n)

2024-12-26 Thread Stuart Henderson
On 2024/12/26 17:36, Kirill A. Korinsky wrote: > On Thu, 26 Dec 2024 17:29:30 +0100, > Stuart Henderson wrote: > > > > Diff that can be applied with patch: > > (I added optional braces as it's multi line and I think clearer > > like that). > > > > ok? > > > > Doesn't a user who runs validation

iked bug: rewind(3) error handling issue in ca.c ca_validate_pubkey()

2024-12-26 Thread William Rusnack
> Synopsis: Failure to detect rewind(3) errors in certificate validation > Category: bin > Description: In iked(8), the ca_validate_pubkey() function uses rewind(3) to retry reading a public key file in a different format after the first attempt fails. However, rew

iked refactor: config and request parser logic

2024-12-26 Thread William Rusnack
>Synopsis: Refactor iked parser to separate config and request parsing >logic >Category: bin >Description: The current implementation in parse.y duplicates logic between CONFIG and REQUEST handling in the ikecfgvals grammar rule. This refactor extracts the common parsing logic

Re: iked fails to cleanup its pf state when service stops

2024-12-26 Thread Stuart Henderson
On 2024/12/26 10:15, William Rusnack wrote: > > Synopsis: iked leaves behind pf state entries for NAT-T (UDP 4500) upon > > stopping > > Category: bin > > Description: > When stopping iked with `rcctl stop iked`, the service leaves behind pf state > entries for NAT-T (UDP 4500) that prevent n

Re: iked.conf(5): Undocumented comment behavior and potential line continuation bug

2024-12-26 Thread Stuart Henderson
On 2024/12/26 10:35, William Rusnack wrote: > > Synopsis: iked.conf(5) incompletely documents comment syntax and has > > potentially problematic behavior where comments can be continued with line > > continuations (\), leading to unexpected configuration parsing. Man page > > also fails to doc

Re: iked bug: root privileges required unnecessarily in configtest mode (-n)

2024-12-26 Thread Stuart Henderson
On 2024/12/26 10:47, William Rusnack wrote: > >Synopsis:The iked(8) daemon currently requires root privileges even when > >run with -n (configtest mode), which only validates the configuration file > >syntax. This prevents system administrators from validating iked > >configuration files fro

iked bug: root privileges required unnecessarily in configtest mode (-n)

2024-12-26 Thread William Rusnack
>Synopsis: The iked(8) daemon currently requires root privileges even when >run with -n (configtest mode), which only validates the configuration file >syntax. This prevents system administrators from validating iked configuration >files from non-privileged accounts. >Category: bin >De

iked bug: incorrectly prints policy requests for configuration payloads

2024-12-26 Thread William Rusnack
>Synopsis: When printing the parsed policy iked erroneously prints config >when it should print request. >Category: bin >Description: The below example iked.conf has a request configuration payload. ```iked.conf ikev2 \ from dynamic to any \

iked bug: debug flag ordering affects verbosity level

2024-12-26 Thread William Rusnack
>Synopsis: The ordering of the iked flags -d and -n erroneously changes >the debug level. >Category: bin >Description: I've found an issue with iked's command line flag processing where the order of the -d and -n flags affects the resulting debug level. This appears to

iked(8): Undocumented debug and verbose flag levels

2024-12-26 Thread William Rusnack
>Synopsis: iked allows for levels of debug and verbosity that is undocumented >in iked(8) >Category: bin >Description: Currently, iked(8) does not document that the -d and -v flags can be specified multiple times. >Fix: Replace the iked(8) man text of ```txt -d

iked refactor: update deprecated OpenSSL EVP digest functions >Synopsis: Update deprecated EVP_DigestInit/Final to _ex variants in iked >Category: bin >Description: The OpenSSL EVP_DigestInit() and

2024-12-26 Thread William Rusnack
>Synopsis: Update deprecated EVP_DigestInit/Final to _ex variants in iked >Category: bin >Description: The OpenSSL EVP_DigestInit() and EVP_DigestFinal() functions have been deprecated in favor of their _ex variants. The old functions automatically reset the context

iked(8): Undocumented -I and -P cli options

2024-12-26 Thread William Rusnack
>Synopsis: The iked cli arg parser accepts the -I and -P options with no >documentation in iked(8) or in the src itself as to what these flags do. >Category: bin >Description: iked supports two undocumented flags, -I and -P, that appear to be testing/development flags. Wh

Re: iked bug: root privileges required unnecessarily in configtest mode (-n)

2024-12-26 Thread Klemens Nanni
26.12.2024 19:29, Stuart Henderson пишет: > Diff that can be applied with patch: > (I added optional braces as it's multi line and I think clearer > like that). OK kn

iked fails to cleanup its pf state when service stops

2024-12-26 Thread William Rusnack
> Synopsis: iked leaves behind pf state entries for NAT-T (UDP 4500) upon > stopping > Category: bin > Description: When stopping iked with `rcctl stop iked`, the service leaves behind pf state entries for NAT-T (UDP 4500) that prevent normal network connectivity until they expire natura

Re: iked bug: debug flag ordering affects verbosity level

2024-12-26 Thread Lucas Gabriel Vuotto
On Thu, Dec 26, 2024 at 10:46:10AM -0500, William Rusnack wrote: > >Synopsis:The ordering of the iked flags -d and -n erroneously changes > >the debug level. > >Category:bin > >Description: > I've found an issue with iked's command line flag processing where the > order of > t

iked.conf(5): Undocumented comment behavior and potential line continuation bug

2024-12-26 Thread William Rusnack
> Synopsis: iked.conf(5) incompletely documents comment syntax and has > potentially problematic behavior where comments can be continued with line > continuations (\), leading to unexpected configuration parsing. Man page also > fails to document that comments can have preceding whitespace

iked bug: Missing length validation in IPv6 netmask prefix calculation

2024-12-26 Thread William Rusnack
> Synopsis: util.c mask2prefixlen6() may read beyond the end of netmask > structure > Category: security > Description: The mask2prefixlen6() function in iked util.c uses the sin6_len field from a sockaddr_in6 structure to determine how many bytes to read when calculatin

Re: iked bug: root privileges required unnecessarily in configtest mode (-n)

2024-12-26 Thread Tobias Heider
On Thu, Dec 26, 2024 at 04:29:30PM +, Stuart Henderson wrote: > On 2024/12/26 10:47, William Rusnack wrote: > > >Synopsis: The iked(8) daemon currently requires root privileges even when > > >run with -n (configtest mode), which only validates the configuration file > > >syntax. This prevent

Re: iked bug: incorrectly prints policy requests for configuration payloads

2024-12-26 Thread Tobias Heider
On Thu, Dec 26, 2024 at 04:33:22PM +, Stuart Henderson wrote: > On 2024/12/26 10:50, William Rusnack wrote: > > >Synopsis: When printing the parsed policy iked erroneously prints config > > >when it should print request. > > >Category: bin > > >Description: > > The below example iked.con