From: Raivis Bucis <raivis@mt.lv>
To: netdev@vger.kernel.org
Cc: waltje@uWalt.NL.Mugnet.ORG, gw4pts@gw4pts.ampr.org
Subject: [BUG] problem with BPF in PF_PACKET sockets, introduced in linux-2.6.19
Date: Thu, 4 Jan 2007 17:47:46 +0200 [thread overview]
Message-ID: <200701041747.46358.raivis@mt.lv> (raw)
Hello,
I believe I have found a bug in PF_PACKET socket filtering (introduced in
linux-2.6.19). If BPF returns values larger than 0x80000000u, run_filter in
af_packet.c considers that as error instead of simply accepting packet in its
full length. sk_filter does not have this problem.
Raivis Bucis
Index: linux-2.6.19/net/packet/af_packet.c
===================================================================
--- linux-2.6.19/net/packet/af_packet.c
+++ linux-2.6.19/net/packet/af_packet.c
@@ -447,6 +447,8 @@
err = -EPERM;
else if (*snaplen > err)
*snaplen = err;
+ else
+ err = *snaplen;
}
rcu_read_unlock_bh();
next reply other threads:[~2007-01-04 16:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-04 15:47 Raivis Bucis [this message]
2007-01-24 23:21 ` [BUG] problem with BPF in PF_PACKET sockets, introduced in linux-2.6.19 David Miller
2007-01-25 13:22 ` Alexey Kuznetsov
2007-01-25 23:53 ` David Miller
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=200701041747.46358.raivis@mt.lv \
--to=raivis@mt.lv \
--cc=gw4pts@gw4pts.ampr.org \
--cc=netdev@vger.kernel.org \
--cc=waltje@uWalt.NL.Mugnet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).