summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAng Way Chuang <wcang@nrg.cs.usm.my>2006-10-13 18:01:44 +0200
committerAdrian Bunk <bunk@stusta.de>2006-10-13 18:01:44 +0200
commit1d82cce6f3d3119c33aed88ed8c94f93341f995a (patch)
treedac375939d4320d0880ab29e34b1b3338954dc39 /drivers
parentcc3c0a32e3ed8d40a8d14522bfb3efe62c11c0af (diff)
dvb-core: Proper handling ULE SNDU length of 0 (CVE-2006-4623)
ULE (Unidirectional Lightweight Encapsulation RFC 4326) decapsulation code has a bug that allows an attacker to send a malformed ULE packet with SNDU length of 0 and bring down the receiving machine. This patch fix the bug and has been tested on version 2.6.17.11. This bug is 100% reproducible and the modified source code (GPL) used to produce this bug will be posted on http://nrg.cs.usm.my/downloads.htm shortly. The kernel will produce a dump during CRC32 checking on faulty ULE packet. Signed-off-by: Ang Way Chuang <wcang@nrg.cs.usm.my> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index 6711eb6a058c..bdc491452dad 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -492,7 +492,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
} else
priv->ule_dbit = 0;
- if (priv->ule_sndu_len > 32763) {
+ if (priv->ule_sndu_len > 32763 ||
+ priv->ule_sndu_len < ((priv->ule_dbit) ? 4 : 4 + ETH_ALEN)) {
printk(KERN_WARNING "%lu: Invalid ULE SNDU length %u. "
"Resyncing.\n", priv->ts_count, priv->ule_sndu_len);
priv->ule_sndu_len = 0;