Repository navigation
Conversation
Collaborator
Author
|
The failed rpm-build:epel-7 looks like a bug in Copr, I raised it at fedora-copr/copr#4596. |
There was a copy-and-paste mistake in an inner loop in
modulemd_module_stream_v2_emit_rpm_map() function. As a result when
serializing a module index into a YAML string where a number of hash
types was different from a number of hashes of a particular type in
"rpm-map" modulemd-v2 YAML element, not all hashes would be serialized
or an invalid memory would be read.
E.g. an attempt to serialize this document:
document: modulemd
version: 2
data:
[...]
artifacts:
rpm-map:
sha256:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
name: bar
epoch: 0
version: 0
release: 0
arch: x86_64
nevra: bar-0:0-0.x86_64
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:
name: foo
epoch: 0
version: 0
release: 0
arch: x86_64
nevra: foo-0:0-0.x86_64
sha512:
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:
name: bar
epoch: 0
version: 0
release: 0
arch: x86_64
nevra: bar-0:0-0.x86_64
would provoke valgrind like this:
Use of uninitialised value of size 8
at 0x48624E6: strlen (vg_replace_strmem.c:506)
by 0x48D9027: mmd_emitter_scalar (modulemd-yaml-util.c:293)
by 0x48C75DE: modulemd_module_stream_v2_emit_rpm_map (modulemd-module-stream-v2.c:3271)
by 0x48C857A: modulemd_module_stream_v2_emit_yaml (modulemd-module-stream-v2.c:3211)
by 0x48B1437: dump_streams (modulemd-module-index.c:498)
by 0x48B1437: modulemd_module_index_dump_to_emitter (modulemd-module-index.c:562)
by 0x48B169C: modulemd_module_index_dump_to_string (modulemd-module-index.c:936)
by 0x401222: main (in /tmp/a.out)
This patch fixes an upper bound condition of the inner loop. It also
adds a test.
This flaw was intruduced with b5abf3b
commit ("Add rpm-map to ModuleStreamV2") and first released in 2.2.0
version.
Acknowledgement: Aisle Research
Resolves: CVE-2026-92824
ppisar
force-pushed
the
CVE-2026-92824
branch
from
November 3, 2026 16:56
6950c81 to
d3763a5
Compare
|
Collaborator
Author
|
I rebased to current main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



There was a copy-and-paste mistake in an inner loop in modulemd_module_stream_v2_emit_rpm_map() function. As a result when serializing a module index into a YAML string where a number of hash types was different from a number of hashes of a particular type in "rpm-map" modulemd-v2 YAML element, not all hashes would be serialized or an invalid memory would be read.
E.g. an attempt to serialize this document:
would provoke valgrind like this:
This patch fixes an upper bound condition of the inner loop. It also adds a test.
This flaw was intruduced with b5abf3b commit ("Add rpm-map to ModuleStreamV2") and first released in 2.2.0 version.
Acknowledgement: Aisle Research
Resolves: CVE-2026-92824