From: Marcel Holtmann <marcel@holtmann.org>
To: Bastian Ballmann <Crazydj@chaostal.de>
Cc: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] PAN and kernel 2.4.26
Date: Mon, 28 Jun 2004 14:58:05 +0200 [thread overview]
Message-ID: <1088427485.3774.203.camel@pegasus> (raw)
In-Reply-To: <1088423529.2513.15.camel@espy.crazydj.de>
Hi Bastian,
> > remove the security patch and try again.
>
> Same effect.
I don't think so, because I looked at the patch and this seems to
introducing the problem:
diff -urPX nopatch linux-2.4.26/net/socket.c linux/net/socket.c
--- linux-2.4.26/net/socket.c Fri Feb 20 10:07:45 2004
+++ linux/net/socket.c Sat Apr 17 02:13:55 2004
@@ -1307,10 +1307,18 @@
asmlinkage long sys_getsockopt(int fd, int level, int optname, char *optval, int *optlen)
{
int err;
+ int len;
struct socket *sock;
if ((sock = sockfd_lookup(fd, &err))!=NULL)
{
+ /* XXX: insufficient for SMP, but should be redundant anyway */
+ if (get_user(len, optlen))
+ err = -EFAULT;
+ else
+ if (len < 0)
+ err = -EINVAL;
+ else
if (level == SOL_SOCKET)
err=sock_getsockopt(sock,level,optname,optval,optlen);
else
And here is the fix for pand to also work with the patch:
diff -u -r1.4 main.c
--- main.c 31 May 2004 22:21:42 -0000 1.4
+++ main.c 28 Jun 2004 10:56:35 -0000
@@ -136,6 +136,7 @@
}
/* Setup L2CAP options according to BNEP spec */
+ olen = sizeof(l2o);
if (getsockopt(sk, SOL_L2CAP, L2CAP_OPTIONS, &l2o, &olen) < 0) {
syslog(LOG_ERR, "Failed to get L2CAP options. %s(%d)",
strerror(errno), errno);
@@ -257,6 +258,7 @@
}
/* Setup L2CAP options according to BNEP spec */
+ olen = sizeof(l2o);
getsockopt(sk, SOL_L2CAP, L2CAP_OPTIONS, &l2o, &olen);
l2o.imtu = l2o.omtu = BNEP_MTU;
setsockopt(sk, SOL_L2CAP, L2CAP_OPTIONS, &l2o, sizeof(l2o));
I committed this one already to CVS, because it is an obvious fix.
Regards
Marcel
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2004-06-28 12:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-26 17:41 [Bluez-devel] PAN and kernel 2.4.26 Bastian Ballmann
2004-06-27 19:20 ` Marcel Holtmann
2004-06-27 21:41 ` Bastian Ballmann
2004-06-28 7:01 ` Marcel Holtmann
2004-06-28 9:12 ` Bastian Ballmann
2004-06-28 9:19 ` Marcel Holtmann
2004-06-28 10:27 ` Bastian Ballmann
2004-06-28 10:36 ` Marcel Holtmann
[not found] ` <1088423529.2513.15.camel@espy.crazydj.de>
2004-06-28 12:58 ` Marcel Holtmann [this message]
2004-06-28 13:23 ` Bastian Ballmann
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=1088427485.3774.203.camel@pegasus \
--to=marcel@holtmann.org \
--cc=Crazydj@chaostal.de \
--cc=bluez-devel@lists.sourceforge.net \
/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