DragonFly BSD
DragonFly bugs List (threaded) for 2005-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Minor headaches using pkgsrc daemons (samba)


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Mon, 11 Jul 2005 23:10:36 +0200

Lately walt <wa1ter@xxxxxxxxxxxxx> said:

> Simon 'corecode' Schubert wrote:
> > Lately walt <wa1ter@xxxxxxxxxxxxx> said:
> 
> >>smbd: stack overflow in function open_sockets_smbd
> >>kernel: pid 907 (smbd), uid 0: exited on signal 6
> 
> >>That is what I get when any client (like smbtree) tries to
> >>connect to my DFly machine running smbd.
> 
> >>Has anyone here been able to get pkgsrc/samba running on DFly?
> 
> 
> > uhm yea, but i forgot how... :) package should be chlamydia/mirrors
> 
> Yes, your package works, thanks.
> 
> I'm trying to become a debugger, so I'm fiddling with gdb to see
> what trouble I can cause ;o)
> 
> After I cause one of those stack overflow errors I can attach gdb
> to the running smbd and a bt produces this:
> 
> #0  0x282e6cb4 in select () from /usr/lib/libc.so.5
> #1  0x081a17b2 in sys_select ()
> #2  0x081ec1f7 in open_sockets_smbd (is_daemon=0, interactive=0,
>      smb_ports=0x14 <Error reading address 0x14: Bad address>) at 
> smbd/server.c:343
> #3  0x00000000 in ?? ()
> 
> Could a programming genius use this info to figure out what's
> going on?

okay, next thing is to run smbd in gdb (foreground mode) and then
put a breakpoint on open_sockets_smbd. Obviously the return address
gets smashed as well, so while stepping through this function,
have a look at the stacktrace. As soon as it's broken, you found
the bug. Easy, no? :)

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low $$$ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

Attachment: pgp00003.pgp
Description: PGP signature



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]