ChangeSet 1.1982.161.35, 2005/03/25 17:49:05-08:00, [EMAIL PROTECTED]
[PATCH] Fix signedness problem at socket creation
From: Marcel Holtmann <[EMAIL PROTECTED]>
CAN-2005-0750 is assigned to this issue
ilja <[EMAIL PROTECTED]> discovered potential local root exploit in
bluetooth socket creation.
This patch fixes a small signedness problem when creating the
socket.
Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]>
Signed-off-by: Chris Wright <[EMAIL PROTECTED]>
af_bluetooth.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -Nru a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
--- a/net/bluetooth/af_bluetooth.c 2005-03-26 11:29:48 -08:00
+++ b/net/bluetooth/af_bluetooth.c 2005-03-26 11:29:48 -08:00
@@ -64,7 +64,7 @@
int bt_sock_register(int proto, struct net_proto_family *ops)
{
- if (proto >= BT_MAX_PROTO)
+ if (proto < 0 || proto >= BT_MAX_PROTO)
return -EINVAL;
if (bt_proto[proto])
@@ -77,7 +77,7 @@
int bt_sock_unregister(int proto)
{
- if (proto >= BT_MAX_PROTO)
+ if (proto < 0 || proto >= BT_MAX_PROTO)
return -EINVAL;
if (!bt_proto[proto])
@@ -92,7 +92,7 @@
{
int err = 0;
- if (proto >= BT_MAX_PROTO)
+ if (proto < 0 || proto >= BT_MAX_PROTO)
return -EINVAL;
#if defined(CONFIG_KMOD)
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html