Bug 967722 - ncftool list/virsh iface-list met error when filename have a comma(,) or the exclamation mark(!) suffix in /etc/sysconfig/network-scripts/
ncftool list/virsh iface-list met error when filename have a comma(,) or the ...
Status: CLOSED DUPLICATE of bug 1165965
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: netcf (Show other bugs)
7.0
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Laine Stump
Virtualization Bugs
:
Depends On: 967720 1165965
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-28 03:00 EDT by Hu Jianwei
Modified: 2015-03-31 11:25 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 967720
Environment:
Last Closed: 2015-03-31 11:25:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hu Jianwei 2013-05-28 03:00:51 EDT
Version:
netcf-0.1.9-3.el6.x86_64
libvirt-0.10.2-18.el6_4.5.x86_64
And, please note that the comma(,) in filename can not reproduce on rhel6, only the exclamation mark(!) reproduced in bug.

+++ This bug was initially created as a clone of Bug #967720 +++

Description of problem:
virsh iface-list met error when filename have a comma(,) or the exclamation mark(!) suffix in /etc/sysconfig/network-scripts path

Version-Release number of selected component (if applicable):
libvirt-1.0.5-2.el7.x86_64
qemu-kvm-1.4.0-4.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64
netcf-0.2.3-4.bz961184.el7.x86_64

How reproducible:
100%

Steps:
1. List all ifcfg-* scripts in /etc/sysconfig/network-scripts.

[root@SRIOV2 network-scripts]# ls | grep ifcfg-
ifcfg-eth1
ifcfg-eth1.bak
ifcfg-eth2
ifcfg-eth3
ifcfg-eth3.bak
ifcfg-eth4
ifcfg-eth5
ifcfg-lo
[root@SRIOV2 network-scripts]# virsh iface-list --all
Name                 State      MAC Address
--------------------------------------------
eth1                 active     b4:b5:2f:af:a1:01
eth3                 active     00:1b:21:55:b3:b9
lo                   active     00:00:00:00:00:00

2. Add file with , and !, like below:
ifcfg-eth1,
ifcfg-eth1!

3. Run virsh iface-list agagin.
[root@SRIOV2 network-scripts]# ls | grep ifcfg-
ifcfg-eth1
ifcfg-eth1,   <======== new file
ifcfg-eth1.bak
ifcfg-eth2
ifcfg-eth3
ifcfg-eth3.bak
ifcfg-eth4
ifcfg-eth5
ifcfg-lo
[root@SRIOV2 network-scripts]# virsh iface-list --all
error: Failed to list interfaces
error: internal error failed to get number of host interfaces: unspecified error - errors in loading some config files

[root@SRIOV2 network-scripts]# touch ifcfg-eth1!
[root@SRIOV2 network-scripts]# ls | grep ifcfg-
ifcfg-eth1
ifcfg-eth1!   <========new file
ifcfg-eth1.bak
ifcfg-eth2
ifcfg-eth3
ifcfg-eth3.bak
ifcfg-eth4
ifcfg-eth5
ifcfg-lo
[root@SRIOV2 network-scripts]# virsh iface-list --all
error: Failed to list interfaces
error: internal error failed to get number of host interfaces: unspecified error - errors in loading some config files

Using ncftool command line:
[root@hujianweitest network-scripts]#  --all
error: unspecified error
error: errors in loading some config files


Actual results:
The command met above error.

Expected results:
The iface-list should filter the invalid netwok-scripts for it or can deal with this abnormal status. For these chars are good for iface-list, such as @ * $ % ^ ~ ; : ? 

Netcf should check those two chars.
Comment 8 Laine Stump 2015-03-31 11:25:55 EDT
Confirmed that this is fixed by the fix for CVE-2014-8119.

*** This bug has been marked as a duplicate of bug 1165965 ***

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