All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: dyslexicatheist <dyslexicatheist@protonmail.com>
Cc: "netfilter-devel@vger.kernel.org" <netfilter-devel@vger.kernel.org>
Subject: Re: invalid read in
Date: Mon, 3 Feb 2020 18:30:03 +0100	[thread overview]
Message-ID: <20200203173003.GF20229@orbyte.nwl.cc> (raw)
In-Reply-To: <7BnNOPQw33ulxkwoWPovsrpwB_JPbS5nJhaTevbPCUkPRxObOpyrmqo3pFe_h82tov85DMfE1cYdX1xX3xhHNLbTef3XXmkqU26_ulUKpfY=@protonmail.com>

Hi,

On Mon, Feb 03, 2020 at 05:14:45PM +0000, dyslexicatheist wrote:
> On Monday, February 3, 2020 4:31 PM, Phil Sutter <phil@nwl.cc> wrote:
> > On Mon, Feb 03, 2020 at 01:54:31PM +0000, dyslexicatheist wrote:
> >
> > I guess this is the typical "problem" situation in which userspace uses
> > a non-zeroed buffer to feed into sendto() and due to padding not
> > every byte was written to. So basically userspace "leaks" garbage to
> > kernel, which is something I'd consider harmless and merely a minor
> > inconvenience when analyzing with valgrind. I usually suffer from this
> > as well since libmnl()'s allocation routines don't zero the buffer
> > either.
> >
> > In your case, I'd say the error message disappears if you add
> > 'memset(&u, 0, sizeof(u))' to the beginning of nfq_set_mode().
> 
> thanks for your help Phil. I have just tried this but unfortunately it didn't change the outcome. Also tried other variations such as memset'ing both &u and the &params struct, but nada.

Maybe you need to apply the same to __build_send_cfg_msg() as well?

Cheers, Phil

  reply	other threads:[~2020-02-03 17:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 13:54 invalid read in dyslexicatheist
2020-02-03 16:31 ` Phil Sutter
2020-02-03 17:14   ` dyslexicatheist
2020-02-03 17:30     ` Phil Sutter [this message]
2020-02-03 17:49       ` dyslexicatheist

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=20200203173003.GF20229@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=dyslexicatheist@protonmail.com \
    --cc=netfilter-devel@vger.kernel.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.