All of lore.kernel.org
 help / color / mirror / Atom feed
From: pageexec@freemail.hu
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter@vger.kernel.org, Wolfram Schlich <lists@wolfram.schlich.org>
Subject: Re: PaX killing conntrackd (strange "execution attempt")
Date: Thu, 20 Nov 2008 13:48:00 +0200	[thread overview]
Message-ID: <49255C80.8215.1C8E5CB2@pageexec.freemail.hu> (raw)
In-Reply-To: <49216734.9080505@netfilter.org>

On 17 Nov 2008 at 13:44, Pablo Neira Ayuso wrote:

> > ok, here's the rest of the story:
> > 
> > (gdb) x/16x $sp
> > 0x7fffffffb398: 0xf7ba28b5      0x00007fff      0x00000001      0x00000000
> > (gdb) x/8i 0x00007ffff7ba28b5-3
> > 0x7ffff7ba28b2 <__build_protoinfo+450>: callq  *(%rdx,%rax,8)
> > 0x7ffff7ba28b5 <__build_protoinfo+453>: mov    $0x1,%eax
> > 0x7ffff7ba28ba <__build_protoinfo+458>: mov    %ebp,%ecx
> > 0x7ffff7ba28bc <__build_protoinfo+460>: shl    %cl,%rax
> > 0x7ffff7ba28bf <__build_protoinfo+463>: or     %eax,(%r14,%rbx,4)
> > 0x7ffff7ba28c3 <__build_protoinfo+467>: cmp    $0x37,%r12d
> > 0x7ffff7ba28c7 <__build_protoinfo+471>: jle    0xfffffffff7ba287f
> > 0x7ffff7ba28c9 <__build_protoinfo+473>: mov    0x10(%rsp),%rdx
> > (gdb) i r rdx rax
> > rdx            0x7ffff7db5000   140737351733248
> > rax            0x37     55
> > (gdb) x/8x $rdx+8*$rax
> > 0x7ffff7db51b8: 0x00000000      0x00000000      0xf7ba9468      0x00007fff
> > 0x7ffff7db51c8: 0xf7ba94b1      0x00007fff      0xf7ba9505      0x00007fff
> > 
> > so that's a null function pointer in whatever structure __build_protoinfo dereferences
> > there. is it of any help to you or do you need me to dig out more?
> 
> Hm, that code belongs to libnetfilter_conntrack (src/conntrack/build.c). 
> The annoying thing is that I see no structure with function pointers in 
> that piece of bits. There are only calls to libnfnetlink functions to 
> build the netlink message that is sent to kernel-space.

sorry, gdb used the wrong symbols, i decoded it by hand now and the failing
code is nfct_copy calling through copy_attr_array[] and it so happens that
the array has no function defined for index ATTR_HELPER_NAME, the last entry
in enum nf_conntrack_attr so i guess it was added without the person being
aware of its uses elsewhere... maybe check your tree for similar issues and
also add some big fat comment to the enum definition to remind yourselves to
update other places when adding a new enum there ;)


  parent reply	other threads:[~2008-11-20 11:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13 10:03 PaX killing conntrackd (strange "execution attempt") Wolfram Schlich
2008-11-13 13:27 ` Wolfram Schlich
2008-11-13 14:42   ` Pablo Neira Ayuso
2008-11-13 16:01     ` Wolfram Schlich
2008-11-13 17:41   ` Wolfram Schlich
2008-11-13 20:10     ` Wolfram Schlich
2008-11-14 12:03       ` Pablo Neira Ayuso
2008-11-14 15:09         ` Wolfram Schlich
2008-11-14 14:36           ` pageexec
2008-11-17 12:44             ` Pablo Neira Ayuso
2008-11-17 13:09               ` Wolfram Schlich
2008-11-17 12:57                 ` pageexec
2008-11-20 11:48               ` pageexec [this message]
2008-11-23 14:07                 ` Wolfram Schlich
2008-11-23 14:24                 ` Pablo Neira Ayuso
2008-11-23 14:29                   ` Wolfram Schlich
2008-11-23 14:36                     ` Pablo Neira Ayuso
2008-11-23 22:03                   ` pageexec
2008-11-24 13:28                     ` Pablo Neira Ayuso
2008-11-14 15:54           ` Wolfram Schlich
2008-11-14 16:18             ` Wolfram Schlich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49255C80.8215.1C8E5CB2@pageexec.freemail.hu \
    --to=pageexec@freemail.hu \
    --cc=lists@wolfram.schlich.org \
    --cc=netfilter@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.