Bug 2226749 - double free and abort in annocheck
Summary: double free and abort in annocheck
Keywords:
Status: MODIFIED
Alias: None
Product: Fedora
Classification: Fedora
Component: annobin
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-26 12:28 UTC by Václav Kadlčík
Modified: 2023-08-16 08:13 UTC (History)
5 users (show)

Fixed In Version: annobin-12.22-1.fc39
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Václav Kadlčík 2023-07-26 12:28:15 UTC
Newest rawhide annobin crashes on a test binary.
Affected: annobin-12.21-1.fc39
Works fine in annobin-12.20-2.fc39.

Reproducible: Always

Steps to Reproduce:
1. Download https://src.fedoraproject.org/tests/annobin/blob/main/f/Regression/wrong-compiler-flags-but-no-failure/files/main_with_gaps_in_notes
2. annocheck --fixed-format-messages main_with_gaps_in_notes

Actual Results:  
annocheck: Version 12.21.
Hardened: PASS: test: pie file: main_with_gaps_in_notes.
Hardened: PASS: test: optimization file: main_with_gaps_in_notes.
Hardened: PASS: test: pic file: main_with_gaps_in_notes.
Hardened: PASS: test: lto file: main_with_gaps_in_notes.
Hardened: PASS: test: stack-prot file: main_with_gaps_in_notes.
Hardened: PASS: test: writable-got file: main_with_gaps_in_notes.
Hardened: PASS: test: dynamic-segment file: main_with_gaps_in_notes.
Hardened: PASS: test: bind-now file: main_with_gaps_in_notes.
Hardened: PASS: test: glibcxx-assertions file: main_with_gaps_in_notes.
Hardened: PASS: test: stack-clash file: main_with_gaps_in_notes.
Hardened: PASS: test: entry file: main_with_gaps_in_notes.
Hardened: PASS: test: gnu-stack file: main_with_gaps_in_notes.
Hardened: PASS: test: gnu-relro file: main_with_gaps_in_notes.
free(): double free detected in tcache 2
Aborted (core dumped)

Expected Results:  
With the previous version, I get the following report:

annocheck: Version 12.20.
Hardened: PASS: test: pie file: main_with_gaps_in_notes.
Hardened: PASS: test: optimization file: main_with_gaps_in_notes.
Hardened: PASS: test: pic file: main_with_gaps_in_notes.
Hardened: PASS: test: lto file: main_with_gaps_in_notes.
Hardened: PASS: test: stack-prot file: main_with_gaps_in_notes.
Hardened: PASS: test: writable-got file: main_with_gaps_in_notes.
Hardened: PASS: test: dynamic-segment file: main_with_gaps_in_notes.
Hardened: PASS: test: bind-now file: main_with_gaps_in_notes.
Hardened: PASS: test: glibcxx-assertions file: main_with_gaps_in_notes.
Hardened: PASS: test: stack-clash file: main_with_gaps_in_notes.
Hardened: PASS: test: entry file: main_with_gaps_in_notes.
Hardened: PASS: test: gnu-stack file: main_with_gaps_in_notes.
Hardened: PASS: test: gnu-relro file: main_with_gaps_in_notes.
Hardened: FAIL: test: gaps file: main_with_gaps_in_notes.
Hardened: PASS: test: notes file: main_with_gaps_in_notes.
Hardened: FAIL: test: cf-protection file: main_with_gaps_in_notes.
Hardened: PASS: test: fast file: main_with_gaps_in_notes.
Hardened: PASS: test: instrumentation file: main_with_gaps_in_notes.
Hardened: PASS: test: production file: main_with_gaps_in_notes.
Hardened: FAIL: test: property-note file: main_with_gaps_in_notes.
Hardened: PASS: test: run-path file: main_with_gaps_in_notes.
Hardened: PASS: test: rwx-seg file: main_with_gaps_in_notes.
Hardened: PASS: test: short-enums file: main_with_gaps_in_notes.
Hardened: PASS: test: textrel file: main_with_gaps_in_notes.
Hardened: PASS: test: threads file: main_with_gaps_in_notes.
Hardened: PASS: test: unicode file: main_with_gaps_in_notes.
Hardened: Rerun annocheck with --verbose to see more information on the tests.
Hardened: main_with_gaps_in_notes: Overall: FAIL.

Comment 1 Nick Clifton 2023-07-26 14:20:28 UTC
snafu introduced when trying to fix a covscan complaint about a resource leak....

Comment 2 Nick Clifton 2023-07-26 14:38:51 UTC
Fixed with annobin-12.22-1.fc39.

Comment 3 Václav Kadlčík 2023-07-27 06:09:06 UTC
(In reply to Nick Clifton from comment #2)
> Fixed with annobin-12.22-1.fc39.

ack, thanks

Comment 4 Fedora Release Engineering 2023-08-16 08:13:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


Note You need to log in before you can comment on or make changes to this bug.