Bug 2211836

Summary: valgrind errors on openscap memcheck
Product: Red Hat Enterprise Linux 8 Reporter: Matus Marhefka <mmarhefk>
Component: valgrindAssignee: Mark Wielaard <mjw>
valgrind sub component: system-version QA Contact: Jesus Checa <jchecahi>
Status: VERIFIED --- Docs Contact:
Severity: unspecified    
Priority: unspecified CC: fweimer, jakub, mjw, ohudlick, qe-baseos-tools-bugs, wcohen
Version: 8.9Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: valgrind-3.21.0-7.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 2209676 Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2209676    
Bug Blocks:    
Deadline: 2023-07-03   

Description Matus Marhefka 2023-06-02 07:55:50 UTC
+++ This bug was initially created as a clone of Bug #2209676 +++

Description of problem:
valgrind errors on openscap memcheck, see the reproducer below. Snip of the log with error (full valgrind output (valgrind.out) is attached):

==33335== Memcheck, a memory error detector
==33335== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==33335== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info
==33335== Command: oscap oval eval rpmverifyfile.oval.xml
==33335== 
==33335== Thread 4 input_handler:
==33335== realloc() with size 0
==33335==    at 0x4849A40: realloc (vg_replace_malloc.c:1649)
==33335==    by 0x495A9CA: UnknownInlinedFun (seap-packet.c:209)
==33335==    by 0x495A9CA: SEAP_packet_recv.isra.0 (seap-packet.c:730)
==33335==    by 0x4931403: SEAP_recvmsg (seap.c:360)
==33335==    by 0x4934034: probe_input_handler (input_handler.c:102)
==33335==    by 0x4A57831: start_thread (in /usr/lib64/libc.so.6)
==33335==    by 0x49F7313: clone (in /usr/lib64/libc.so.6)
==33335==  Address 0x7e44fe0 is 0 bytes after a block of size 0 alloc'd
==33335==    at 0x484482F: malloc (vg_replace_malloc.c:431)
==33335==    by 0x495A40F: UnknownInlinedFun (seap-packet.c:110)
==33335==    by 0x495A40F: SEAP_packet_recv.isra.0 (seap-packet.c:730)
==33335==    by 0x4931403: SEAP_recvmsg (seap.c:360)
==33335==    by 0x4934034: probe_input_handler (input_handler.c:102)
==33335==    by 0x4A57831: start_thread (in /usr/lib64/libc.so.6)
==33335==    by 0x49F7313: clone (in /usr/lib64/libc.so.6)
==33335== 
Error:
  unknown error code 14

Memcheck: the 'impossible' happened:
   unknown error code in mc_eq_Error
...


Version-Release number of selected component (if applicable):
valgrind-3.21.0-2.el8.x86_64
openscap-1.3.7-1.el8.x86_64


How reproducible:
deterministic


Steps to Reproduce:
1. dnf -y install openscap-scanner valgrind
2. dnf -y debuginfo-install openscap
3. valgrind --leak-check=full oscap oval eval rpmverifyfile.oval.xml &>valgrind.out

Note: Tested on RHEL-8.9.0-20230521.41 compose, error occurs also without `--leak-check=full` parameter. File rpmverifyfile.oval.xml is attached.


Actual results:
valgrind errors on openscap memcheck with "unknown error code 14".


Expected results:
valgrind successfully performs openscap memcheck.


Additional info: