<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Thank you for help again.</div><div>It looks good to me.</div><div>Thank you.<br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>"Tobias Brunner" <tobias@strongswan.org><br><b>À: </b>"jean-francois hren" <jean-francois.hren@stormshield.eu><br><b>Cc: </b>"dev" <dev@lists.strongswan.org><br><b>Envoyé: </b>Vendredi 1 Octobre 2021 13:55:46<br><b>Objet: </b>Re: [strongSwan-dev] Memwipe of loaded secrets through VICI<br></div><div><br></div><div data-marker="__QUOTED_TEXT__">Hi Jean-Francois,<br><br>> For the mmap, I'm not expert and I use Strongswan under FreeBSD so I'm <br>> not sure the behavior is the same.<br><br>Yeah, don't know either.<br><br>> However since decrypted private key blobs are written in the mmap chunk, <br><br>As far as I can tell, that's not the case. The first thing the pem <br>plugin does is cloning the chunk (pem_builder_t:load_from_blob()). But <br>if the key is not encrypted and mmap() is not available, there will <br>definitely be another copy of the key in memory that we have to clean.<br><br>> In src/swanctl/commands/load_creds.c:load_containers(), a call to <br>> chunk_unmap_clear() should be done too maybe ?<br><br>While it's possible to create PKCS#12 containers without encryption, I <br>don't think that's very common in practice. But sure, we can add it <br>just to be safe.<br><br>> The static buffer returned by getpass() calls in swanctl should be wiped <br>> too after use.<br><br>Thanks, I've pushed another commit that changes that for all getpass() <br>calls.<br><br>Regards,<br>Tobias<br></div></div></body></html>