Skip to contentSkip to conversation

2.2 - wanxl unchecked copy_to_user

PATCH New Arnaldo Carvalho de Melo 1 participant 1 message Dec 20, 2000 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.2 - wanxl unchecked copy_to_user

Hi,

Please consider applying, there must well be other things to do on
this failure, please check.

- Arnaldo

drivers/net/wanxl.c +4 -1
@@ -1088,7 +1088,10 @@
 
 	writel(1, &card->config->valid);
   
-	copy_to_user(data, card->config, sizeof(board_cfg));
+	if (copy_to_user(data, card->config, sizeof(board_cfg))) {
+		wanxl_destroy_card(card, 0);
+		return -EFAULT;
+	}
 	*length=sizeof(board_cfg);
 	card->running=1;
 	return 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/