Skip to content
Snippets Groups Projects
Commit 1dc5214a authored by Christian Löpke's avatar Christian Löpke
Browse files

Fixed security vulnerability if writing unterminated max length string.

parent 72b81bfa
Branches
Tags release-2.14.3
No related merge requests found
Pipeline #
...@@ -183,7 +183,7 @@ device_write(struct file *filp, const char *buff, size_t len, loff_t * off) ...@@ -183,7 +183,7 @@ device_write(struct file *filp, const char *buff, size_t len, loff_t * off)
/* Since nobody wants to read I have to correct the already told you /* Since nobody wants to read I have to correct the already told you
counter! */ counter! */
told_you_counter--; told_you_counter--;
if(len > USERBUF_LEN) { if(len >= USERBUF_LEN) {
printk( KERN_WARNING printk( KERN_WARNING
"%s: Sorry, your input is too long. Max %d allowed!\n", "%s: Sorry, your input is too long. Max %d allowed!\n",
DEVICE_NAME, DEVICE_NAME,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment