Bug 579382 - dhcrelay segfaults on first packet received
Summary: dhcrelay segfaults on first packet received
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jiri Popelka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-04 20:28 UTC by Geert Jansen
Modified: 2013-03-13 06:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-03 16:20:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Geert Jansen 2010-04-04 20:28:33 UTC
Description of problem:

dhcrelay segfaults on first received packet.

Version-Release number of selected component (if applicable):

# rpm -q dhcp
dhcp-4.1.1-9.fc12.x86_64

How reproducible:

100%

Steps to Reproduce:

The system in question is a gateway between two networks. The first network ("home") is 192.168.1.0/24 and the second ("lab.home") 192.168.2.0/24. eth0 is connected to "home" with IP address 192.168.1.4, eth1 is connected to "lab.home" with IP address 192.168.2.1. My DHCP server is at 192.168.1.5 ("sheeva.home"). I want to make DHCP services available to the "lab.home" network via dhcrelay running on the gateway. /etc/sysconfig/dhcrelay contains:

# cat /etc/sysconfig/dhcrelay 
# Command line options here
INTERFACES="eth1"
DHCPSERVERS="sheeva.home"

When i run a dhclient on a system on the lab.home network, dhcrelay immediately 

Additional info:

[root@master ~]# gdb dhcrelay
GNU gdb (GDB) Fedora (7.0.1-37.fc12)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/dhcrelay...Reading symbols from /usr/lib/debug/usr/sbin/dhcrelay.debug...done.
done.
(gdb) set args -d -i eth1 sheeva.home
(gdb) r
Starting program: /usr/sbin/dhcrelay -d -i eth1 sheeva.home
Internet Systems Consortium DHCP Relay Agent 4.1.1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/00:1b:21:35:62:1e
Sending on   LPF/eth1/00:1b:21:35:62:1e
Sending on   Socket/fallback

Program received signal SIGSEGV, Segmentation fault.
0x0000000000409f37 in do_relay4 (ip=<value optimized out>, packet=0x7fffffffcfe0, length=300, 
    from_port=<value optimized out>, from=..., hfrom=<value optimized out>) at dhcrelay.c:660
660			packet->giaddr = ip->addresses[0];
(gdb) bt
#0  0x0000000000409f37 in do_relay4 (ip=<value optimized out>, packet=0x7fffffffcfe0, length=300, 
    from_port=<value optimized out>, from=..., hfrom=<value optimized out>) at dhcrelay.c:660
#1  0x00000000004118a5 in got_one (h=0x86d960) at discover.c:1396
#2  0x000000000043cf6b in omapi_one_dispatch (wo=<value optimized out>, t=<value optimized out>)
    at dispatch.c:520
#3  0x000000000041388a in dispatch () at dispatch.c:92
#4  0x0000000000408621 in main (argc=<value optimized out>, argv=<value optimized out>) at dhcrelay.c:549

Comment 1 Jiri Popelka 2010-04-06 10:16:31 UTC
Thanks for the backtrace.

I already saw this in Bug #547694, comment #1.
I hadn't found (I couldn't reproduce it) where the problem was,
but reporter claimed (Bug #547633, comment #6)
it was fixed in 4.1.1-5.fc12.

I actually have no idea now where the problem can be,
but can you show me what does 'ip addr show' on the gateway.

Comment 2 Bug Zapper 2010-11-03 17:53:06 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Bug Zapper 2010-12-03 16:20:28 UTC
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 4 Jiri Popelka 2013-03-12 14:28:18 UTC
FYI

This has been fixed upstream in ISC dhcp-4.2.2b1 with the following note in changelog:

- Relay no longer crashes, when DHCP packet is received over interface without
  any IPv4 address assigned. [ISC-Bugs #22409]


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