]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: vt6656: [BUG] out of bound array reference in RFbSetPower.
authorMalcolm Priestley <tvboxspy@gmail.com>
Sun, 7 Oct 2012 07:27:00 +0000 (08:27 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 3 Jan 2013 03:33:56 +0000 (03:33 +0000)
commit ab1dd9963137a1e122004d5378a581bf16ae9bc8 upstream.

Calling RFbSetPower with uCH zero value will cause out of bound array reference.

This causes 64 bit kernels to oops on boot.

Note: Driver does not function on 64 bit kernels and should be
blacklisted on them.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/staging/vt6656/rf.c

index 3fd0478a9a540f447e2ab657e54b352565ce78c2..8cf0881888b275c51b282a262d821bc99a34eaeb 100644 (file)
@@ -769,6 +769,9 @@ BYTE    byPwr = pDevice->byCCKPwr;
         return TRUE;
     }
 
+       if (uCH == 0)
+               return -EINVAL;
+
     switch (uRATE) {
     case RATE_1M:
     case RATE_2M: