Bug 2216125

Summary: the lldptool program segfaults after entering the quit command
Product: Red Hat Enterprise Linux 9 Reporter: Milos Malik <mmalik>
Component: lldpadAssignee: Aaron Conole <aconole>
Status: NEW --- QA Contact: Matt Lucius <malucius>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: kzhang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 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:

Description Milos Malik 2023-06-20 08:41:25 UTC
Description of problem:

Version-Release number of selected component (if applicable):
lldpad-1.1.0-4.git85e5583.el9.x86_64

How reproducible:
 * always

Steps to Reproduce:
1. get a RHEL-9.3 machine
2. start the lldpad service
3. run the lldptool program
4. write the quit word and hit the enter key

Actual results:
# service lldpad start
Redirecting to /bin/systemctl start lldpad.service
# service lldpad status
Redirecting to /bin/systemctl status lldpad.service
● lldpad.service - Link Layer Discovery Protocol Agent Daemon.
     Loaded: loaded (/usr/lib/systemd/system/lldpad.service; disabled; preset: disabled)
     Active: active (running) since Tue 2023-06-20 04:33:29 EDT; 2s ago
TriggeredBy: ● lldpad.socket
   Main PID: 6532 (lldpad)
      Tasks: 1 (limit: 11103)
     Memory: 260.0K
        CPU: 3ms
     CGroup: /system.slice/lldpad.service
             └─6532 /usr/sbin/lldpad -t

Jun 20 04:33:29 localhost systemd[1]: Started Link Layer Discovery Protocol Agent Daemon..
# lldptool 
lldptool v1.1.0
Copyright (c) 2007-2010, Intel Corporation

Substantially modified from:  hostapd_cli v 0.5.7
Copyright (c) 2004-2007, Jouni Malinen <j> and contributors

This program is free software. You can distribute it and/or modify it
under the terms of the GNU General Public License version 2.




Interactive mode

> quit
Segmentation fault (core dumped)
# echo $?
139
# coredumpctl info -1
           PID: 6541 (lldptool)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 11 (SEGV)
     Timestamp: Tue 2023-06-20 04:33:53 EDT (19s ago)
  Command Line: lldptool
    Executable: /usr/sbin/lldptool
 Control Group: /user.slice/user-0.slice/session-4.scope
          Unit: session-4.scope
         Slice: user-0.slice
       Session: 4
     Owner UID: 0 (root)
       Boot ID: 91c337f8e9d84076b6c161b945a84099
    Machine ID: 75adac55e63d405788054ece8700e152
      Hostname: localhost
       Storage: /var/lib/systemd/coredump/core.lldptool.0.91c337f8e9d84076b6c161b945a84099.6541.1687250033000000.zst (present)
  Size on Disk: 29.7K
       Message: Process 6541 (lldptool) of user 0 dumped core.
                
                Stack trace of thread 6541:
                #0  0x00007f81a05be2ae _dl_close (ld-linux-x86-64.so.2 + 0x82ae)
                #1  0x00007f81a0395fd8 _dl_catch_exception (libc.so.6 + 0x195fd8)
                #2  0x00007f81a03960a3 _dl_catch_error (libc.so.6 + 0x1960a3)
                #3  0x00007f81a029b36e _dlerror_run (libc.so.6 + 0x9b36e)
                #4  0x00007f81a029b0d6 dlclose.5 (libc.so.6 + 0x9b0d6)
                #5  0x0000555bf06dba92 main (lldptool + 0x3a92)
                #6  0x00007f81a023feb0 __libc_start_call_main (libc.so.6 + 0x3feb0)
                #7  0x00007f81a023ff60 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x3ff60)
                #8  0x0000555bf06dbae5 _start (lldptool + 0x3ae5)
                ELF object binary architecture: AMD x86-64
#

Expected results:
 * no segfaults