-
-
Notifications
You must be signed in to change notification settings - Fork 46
Clean up list options before passing them to GnuPG #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
9cdc680 to
8394915
Compare
GnuPG's parsing of list options is not well-documented. The current behavior is consistent with that of GnuPG itself, but it depends on various GnuPG implementation details. Avoid this by only passing cleaned-up "canonical" list options. This means that options are separated with a single comma, as are a list of subpacket arguments. To simplify the code, whether a list option argument is in double quotes is preserved. This modifies the option in-place, rather than making a copy. A bounded buffer abstraction and assertions are used to validate that data is not overwritten until after it has already been read and therefore will not be needed again. This also ensures that no out of bounds writes occur. Fixes QubesOS/qubes-issues#10540
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026011018-4.3-debian&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025111104-4.3&flavor=update Failed testsNo failures! Fixed failuresCompared to: https://openqa.qubes-os.org/tests/158999#dependencies 10 fixed
Unstable testsDetailsPerformance TestsPerformance degradation:No issues Remaining performance tests:13 tests
|
GnuPG's parsing of list options is not well-documented. The current behavior is consistent with that of GnuPG itself, but it depends on various GnuPG implementation details. Avoid this by only passing cleaned-up "canonical" list options. This means that options are separated with a single comma, as are a list of subpacket arguments. To simplify the code, whether a list option argument is in double quotes is preserved.
This modifies the option in-place, rather than making a copy. A bounded buffer abstraction and assertions are used to validate that data is not overwritten until after it has already been read and therefore will not be needed again. This also ensures that no out of bounds writes occur.
Fixes QubesOS/qubes-issues#10540