Attention is currently required from: Alexandre Laroche, Arne Schwabe.

Răzvan Cojocaru has posted comments on this change by Alexandre Laroche. ( 
https://gerrit.openvpn.net/c/openvpn/+/2155?usp=email )

Change subject: Check the result of unchecked allocations in the server
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

File src/openvpn/.dirstamp:

PS1:
This file has been committed accidentaly. Please remove it.


File src/openvpn/ssl_verify_openssl.c:

https://gerrit.openvpn.net/c/openvpn/+/2155/comment/a1412397_6b6c7997?usp=email 
:
PS1, Line 327:     check_malloc_return(buf);
If the certificate's SN is 0, `BN_num_bytes()` returns 0 and the code calls 
`malloc(0)`. Some libc builds return `NULL` for `malloc(0)`.

`check_malloc_return(NULL)` would now abort with "Out of Memory".

Before this patch, this case worked because nothing was ever written to the 
buffer, so this is now a regression.

We could probably just use `gc_malloc()` here instead, which would not return 
`NULL` for SN 0.

Granted, everything aligning to where the SN is 0 and the used libc returning 
`NULL` for `malloc 0` is not very likely.



--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2155?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I603321ae6893dbdb054deae5a9bff5e52cbb7429
Gerrit-Change-Number: 2155
Gerrit-PatchSet: 1
Gerrit-Owner: Alexandre Laroche
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Alexandre Laroche
Gerrit-Attention: Arne Schwabe <[email protected]>
Gerrit-Comment-Date: Mon, 09 Nov 2026 12:53:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to