For
openpgp_oid_from_str has a wrong memory-safety assumption
For
openpgp_oid_from_str has a wrong memory-safety assumption
For Integer Overflow in literals_seen, I think that the claim is wrong.
When literals_seen becomes two, GnuPG stops processing to return an error.
It's not possible for GnuPG to keep processing.
For Integer Truncation of Arguments report, since the int value is limited to one-octet value, we could add check for the length of input when we use strtol.
We have fixed it but the commit also states:
I agree because the original purpose from the 90ies to enable the use of signed patch files in the Linux kernel community was never actually used and GnuPG stopped the distribution of patches from version to version many years ago. Thus I agree we should hide this option behind a compatibility flag.
Added a compatibility flag in: rGad0c6c33c3d6: gpg: Do not use a default when asking for another output filename.
This feature should be only enabled with a compatibility flag.
Mitigation would be: adding context validation in add_onepass_sig function, which checks WHAT of armored input.
Pushed the revised change to master.
For argparse we use /etc as a default but applications may use gpgrt_set_confdir to set a different one. Howeever if we already have a new get_sysconfdir function, it is easy and useful to change the default on Unix.
In GnuPG we use CSIDL_COMMON_APPDATA and append "\GNU\etc\gnupg". If this can't be found we use the rootdir, that is he installation directory of the binary or one up if installed below a bin directory. The reason for using GNU and not POSIX or Unix is merely to avoid name clashes with other software ported to Windows. There was no real standard for this on Windows.
We already did this for Libgcrypt 1.8 but take care that an installer includig Libgcrypt should run something like
It is not an ADSK issue. The problem is that the new subkey has not been entered into the fingerprint table and can thus not be found.
Fixed in 2.5.13.
Thanks for the quick response. I can confirm the patch works in my setup.
Thank you for your report.
Note that:
If we consider backporting this to 1.10/1.11 branch, we also need to apply: rCdef1d4ea8f66: random:jent: Fix build with address sanitizer.
@jukivili
Thanks for your feedback.
There's GCRYPT_IN_ASAN_TEST environment variable check in tests/t-secmen.c and tests/t-sexp.c. Are those check needed after this change? Could they be removed?
For the initial attempt, I push: rCfe06287003a1: secmem: Handle HAVE_BROKEN_MLOCK for the case with ASAN.
This is better than nothing.
Note that currently Kleopatra (gpg4win 5 beta) fails to delete the key, which might impact other operations. I'm currently trying to figure out, if some other bugs/quirks are a subsequent error or not.
Workaround is to use --with-keygrip and delete both <keygrip>.key files. Problem here is that one part may be on a smartcard or one part might be shared (although not allowed) with other keys.
Right, it's the same with gpgol disabled. I set it to invalid.
But you are able to do this w/o gpgol being active?
Then I don't see how we can avoid this. It should be easy to reproduce this with gpgconf alone if you know how to use --change-options manually. Simply set the LDAP server that's already configured in the global config file.
Looks good to me on gpg4win-5.0.0-beta395 @ win11 (gpg 2.5.13).
gpgconf does not know about the global config files. Nor does it known about things like gpg.conf-2 etc.
I guess this is easy to explain:
I applied it to the 2.4 branch but please do not continue to translate for 2.4. 2.6 (master) is the new target.
Pushed the change to gnupg master: rG61ff3759e827: common,dirmngr:w32: Fix for semi-hosted environment.
In libgpg-error, I pushed thread-safe version : rE0313b660f8bd: w32: Don't convert slash->backslash when it's under Wine.
I'm going to push similar code to gnupg master.
Hi, I've managed to reproduce this bug on the gpg4win-5 beta as well. I think the frequency has gone down, perhaps, but it is still present.
The problem here is that iobuf_readbyte returns -1 on error and on EOF. parse_packet is not able to distinguish that because for histroic reasons we do not return a gpg-error code (GPG_ERR_EOF). To fix this we need to change all callers of parse_packet to not act upon -1 but only on an error code.
The latter is also the case for deleted softkeys.
Fixed in 1.56.
Fixed in 1.3.2.
We recently noticed problem at a customer site with creating the standard rsa3072 keys. It basically stopped working. A likely cause for this seems to be some anti-malware software slowing down file system calls. In the wake of this we looked again at our file locking strategy and found a few things which are not as they should be. For example the release of the lock before a Close call. Trying to fix this unfortunately caused other problems, thus a couple of fixes are needed.
I updated the branch.
I implemented that in the old 2.2 branch for easier testing.
Please let us not clutter the code with OS specific things. We could use a gnupg_remove_ext or gnupg_remove_maybe_wait with a wait parameter which maps to a plain gnupg_remove for Unix. The GPGRT_PROCESS_DETACHED, in the asshelp is also the only specific thing which can be move to a file global macro.
I think that modifying gnupg_remove is a bit risky because it's used in many places.
I'd rather introduce new function for Windows; gnupg_w32_delete_file for this particular purpose.
Factoring out wait_when_sharing_violation function from gnupg_rename_file.
Tested a little late and on Windows 11 with VS-Desktop-3.3.90.16-Beta (a Beta for VSD 3.3.3):
The gnupg_remove should retry if it has a sharing violation. Similar to what we do in gnupg_rename_file. I just figured that we do a remove in the latter function too w/o handling a sharing violation.
Here is a possible fix: