lkml.org 
[lkml]   [2005]   [Mar]   [23]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateWed, 23 Mar 2005 16:52:43 +0900
FromHorms <>
Subject[Patch] Fix ATM copy-to-user usage in 2.4
Applologies if this is already pending, but the signdness fix for
atm_get_addr() in  2.6 seems to be needed for 2.4 as well.

This relates to the bugs reported in this document
http://www.guninski.com/where_do_you_want_billg_to_go_today_3.html

-- 
Horms

Backport of  ATM copy-to-user signedness fix from 2.6

Signed-off-by: Simon Horman <horms@verge.net.au>

===== net/atm/addr.h 1.2 vs edited =====
--- 1.2/net/atm/addr.h	2002-02-05 16:39:14 +09:00
+++ edited/net/atm/addr.h	2005-03-23 13:40:46 +09:00
@@ -13,6 +13,6 @@
 void atm_reset_addr(struct atm_dev *dev);
 int atm_add_addr(struct atm_dev *dev,struct sockaddr_atmsvc *addr);
 int atm_del_addr(struct atm_dev *dev,struct sockaddr_atmsvc *addr);
-int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,int size);
+int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,size_t size);
 
 #endif
===== net/atm/addr.c 1.4 vs edited =====
--- 1.4/net/atm/addr.c	2003-09-04 12:31:04 +09:00
+++ edited/net/atm/addr.c	2005-03-23 13:41:03 +09:00
@@ -114,7 +114,7 @@
 }
 
 
-int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,int size)
+int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,size_t size)
 {
 	unsigned long flags;
 	struct atm_dev_addr *walk;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-04-06 11:30    [from the cache]
©2003-2008