Skip to content

segfault in pktdump

I was trying to use pktdump -split on a bad .pkt file and received a core dump. bt and bt full to follow. Let me know if you'd like me upload the bad packet for you to test with.

bbs@bbs:/sbbs/fido/inbound$ gdb /home/bbs/sbbs-git/src/sbbs3/gcc.linux.x64.exe.debug/pktdump core.2874440

Reading symbols from /home/bbs/sbbs-git/src/sbbs3/gcc.linux.x64.exe.debug/pktdump...
[New LWP 2874440]
Core was generated by `pktdump -split 613300fe.bad'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f6766ef705d in fputc (c=64, fp=0x5606004c4143) at fputc.c:35
35      fputc.c: No such file or directory.
(gdb) bt
#0  0x00007f6766ef705d in fputc (c=64, fp=0x5606004c4143) at fputc.c:35
#1  0x000056068dfbc653 in pktdump (fp=0x56068e059890, fname=0x7ffe6ce60717 "613300fe.bad", good=0x56068e059a70, bad=0x56068e059c50)
    at pktdump.c:247
#2  0x000056068dfbccfe in main (argc=3, argv=0x7ffe6ce5e7b8) at pktdump.c:362
(gdb) bt full
#0  0x00007f6766ef705d in fputc (c=64, fp=0x5606004c4143) at fputc.c:35
        result = <optimized out>
#1  0x000056068dfbc653 in pktdump (fp=0x56068e059890, fname=0x7ffe6ce60717 "613300fe.bad", good=0x56068e059a70, bad=0x56068e059c50)
    at pktdump.c:247
        corrupted = false
        count = 12
        ch = 1
        lastch = 13
        buf = "\000\000\000\000[\000\000\000\001\000\000\000\000\000\000\000\060\321\357fg\177\000\000\000\000\000\000\000\000\000\000\330\001\000\000\000\000\000\000\000\226\027a\300\372\224(?\324\373\215\006V\000\000P\234\005\216\006V\000\000\260\326\345l\376\177\000\000P\234\005\216\006V\000\000?\324\373\215\006V", '\000' <repeats 18 times>, "\016\353\356fg\177\000\000\000\000\000\000\000\000\000\000 \316\373\215\006V\000"
        to = "All", '\000' <repeats 32 times>
        from = "Daryl Stout", '\000' <repeats 24 times>
        subj = "Argued Hearing", '\000' <repeats 57 times>
        offset = 42624
        orig = {zone = 8, net = 8, node = 3, point = 0, domain = "\000\000\000\000\000\000\000\000"}
        dest = {zone = 8, net = 7315, node = 1, point = 0, domain = "\000\000\000\000\000\000\000\000"}
        pkthdr = {type2 = {orignode = 3, destnode = 1, year = 2021, month = 8, day = 4, hour = 7, min = 15, sec = 30, baud = 0,
            pkttype = 2, orignet = 8, destnet = 7315, prodcode = 255 '\377', sernum = 1 '\001',
            password = "\000\000\000\000\000\000\000", origzone = 8, destzone = 8,
            fill = "\000\000\000\001\020\004\001\000\b\000\b\000\000\000\000\000\000\000\000"}, type2plus = {orignode = 3,
            destnode = 1, year = 2021, month = 8, day = 4, hour = 7, min = 15, sec = 30, baud = 0, pkttype = 2, orignet = 8,
            destnet = 7315, prodcodeLo = 255 '\377', prodrevMajor = 1 '\001', password = "\000\000\000\000\000\000\000",
            oldOrigZone = 8, oldDestZone = 8, auxnet = 0, cwcopy = 256, prodcodeHi = 16 '\020', prodrevMinor = 4 '\004', cword = 1,
            origzone = 8, destzone = 8, origpoint = 0, destpoint = 0, proddata = "\000\000\000"}, type2_2 = {orignode = 3,
            destnode = 1, origpoint = 2021, destpoint = 8, reserved = "\004\000\a\000\017\000\036", subversion = 0, pkttype = 2,
            orignet = 8, destnet = 7315, prodcode = 255 '\377', prodrev = 1 '\001', password = "\000\000\000\000\000\000\000",
            origzone = 8, destzone = 8, origdomn = "\000\000\000\001\020\004\001", destdomn = "\b\000\b\000\000\000\000",
            proddata = "\000\000\000"}}
        pkdmsg = {type = 2, orignode = 3, destnode = 1, orignet = 8, destnet = 7315, attr = 256, cost = 0,
          time = "04 Sep 21  00:03:54"}
#2  0x000056068dfbccfe in main (argc=3, argv=0x7ffe6ce5e7b8) at pktdump.c:362
        good = 0x56068e059a70
        bad = 0x56068e059c50
        good_fname = "613300fe.bad.good", '\000' <repeats 4079 times>
        bad_fname = "613300fe.bad.bad", '\000' <repeats 4080 times>
        fp = 0x56068e059890
        split = true
        recover = false
        i = 2
        revision = "1.17", '\000' <repeats 11 times>
(gdb)
Edited by Nigel Reed