Bug 11468 - ifconfig parsing bug
ifconfig parsing bug
Product: Red Hat Linux
Classification: Retired
Component: net-tools (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Crutcher Dunnavant
Depends On:
  Show dependency treegraph
Reported: 2000-05-17 09:38 EDT by rjb
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-05-17 09:38:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description rjb 2000-05-17 09:38:49 EDT
ifconfig doesnt parse its arguments properly and generate a syntax error
in the case that more than one address is specified.  For example:

ifconfig eth0

will generate five calls to ioctl(SIOCSIFADDR).  One for each with the
final address being set.  Now imagine if someone types

ifconfig eth0 mask

instead of

ifconfig eth0 netmask

and further suppose that that user is unlucky enough to have a machine
called "mask" on their network.  Then the final address set of will fail (it is an invalid address) and the machine will be
left with its IP address being the same as that of machine "mask".

This is bad.  ifconfig should check its arguments properly and fail with
a usage message if too many are specified.

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