Bug 2211836 - valgrind errors on openscap memcheck
Summary: valgrind errors on openscap memcheck
Keywords:
Status: VERIFIED
Alias: None
Deadline: 2023-07-03
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: valgrind
Version: 8.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Mark Wielaard
QA Contact: Jesus Checa
URL:
Whiteboard:
Depends On: 2209676
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-02 07:55 UTC by Matus Marhefka
Modified: 2023-06-27 07:48 UTC (History)
6 users (show)

Fixed In Version: valgrind-3.21.0-7.el8
Doc Type: No Doc Update
Doc Text:
Clone Of: 2209676
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
KDE Software Compilation 470520 0 NOR RESOLVED Multiple realloc zero errors crash in MC_(eq_Error) 2023-06-27 06:25:42 UTC
Red Hat Issue Tracker RHELPLAN-159736 0 None None None 2023-06-13 16:57:28 UTC

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:


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