Skip to contentSkip to conversation

Patch "siox: fix possible buffer overflow in device_add_store" has been added to the 4.16-stable tree

PATCH [email protected] 1 participant 1 message Apr 6, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

siox: fix possible buffer overflow in device_add_store

to the 4.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
siox-fix-possible-buffer-overflow-in-device_add_store.patch
and it can be found in the queue-4.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From f87deada80fe483e2286e29cd866dc66ddc2b6bc Mon Sep 17 00:00:00 2001

From: Gavin Schenk <[email protected]>
Date: Wed, 14 Feb 2018 15:25:02 +0100
Subject: siox: fix possible buffer overflow in device_add_store
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Gavin Schenk <[email protected]>

commit f87deada80fe483e2286e29cd866dc66ddc2b6bc upstream.

Width 20 given in format string is larger than destination buffer 'type[20]', use %19s to prevent overflowing it.

Fixes bbecb07fa0af ("siox: new driver framework for eckelmann SIOX")
Cc stable <[email protected]>
---
 drivers/siox/siox-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/siox/siox-core.c +1 -1
@@ -594,7 +594,7 @@ static ssize_t device_add_store(struct d
 	size_t inbytes = 0, outbytes = 0;
 	u8 statustype = 0;
 
-	ret = sscanf(buf, "%20s %zu %zu %hhu", type, &inbytes,
+	ret = sscanf(buf, "%19s %zu %zu %hhu", type, &inbytes,
 		     &outbytes, &statustype);
 	if (ret != 3 && ret != 4)
 		return -EINVAL;

Patches currently in stable-queue which might be from [email protected] are

queue-4.16/siox-fix-possible-buffer-overflow-in-device_add_store.patch