Minor headaches using pkgsrc daemons (samba)
Simon 'corecode' Schubert
corecode at fs.ei.tum.de
Mon Jul 11 14:10:57 PDT 2005
Lately walt <wa1ter at xxxxxxxxxxxxx> said:
> Simon 'corecode' Schubert wrote:
> > Lately walt <wa1ter at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00003.pgp
Type: application/octet-stream
Size: 189 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/bugs/attachments/20050711/840ba7a8/attachment-0022.obj>
More information about the Bugs
mailing list