Skip to contentSkip to conversation

Format string bug in drivers/of/of_i2c.c

PATCH In review Jon Smirl 2 participants 3 messages Oct 20, 2008 – Oct 21, 2008 Device tree

lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

PATCH 1/1 Format string bug in drivers/of/of_i2c.c

Format string bug. Not exploitable, as this is only writable by root, but worth fixing all the same.

See 326f6a5c9c9e1a62aec37bdc0c3f8d53adabe77b

---
 drivers/of/of_i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/of/of_i2c.c +1 -1
index 6a98dc8..24bbef7 100644
@@ -41,7 +41,7 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
 
 		info.addr = *addr;
 
-		request_module(info.type);
+		request_module("%s", info.type);
 
 		result = i2c_new_device(adap, &info);
 		if (result == NULL) {
#1 lore raw
Quoted 2 lines · Jon Smirl

Format string bug. Not exploitable, as this is only writable by root, but worth fixing all the same.

Where is your signed-off-by ?

Cheers,
Ben.

Quoted 23 lines

See 326f6a5c9c9e1a62aec37bdc0c3f8d53adabe77b

---
 drivers/of/of_i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/of/of_i2c.c +1 -1
index 6a98dc8..24bbef7 100644
@@ -41,7 +41,7 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
 
 		info.addr = *addr;
 
-		request_module(info.type);
+		request_module("%s", info.type);
 
 		result = i2c_new_device(adap, &info);
 		if (result == NULL) {

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

author
#2 lore raw

Format string bug. Not exploitable, as this is only writable by root, but worth fixing all the same.

See 326f6a5c9c9e1a62aec37bdc0c3f8d53adabe77b

---
 drivers/of/of_i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/of/of_i2c.c +1 -1
index 6a98dc8..24bbef7 100644
@@ -41,7 +41,7 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
 
 		info.addr = *addr;
 
-		request_module(info.type);
+		request_module("%s", info.type);
 
 		result = i2c_new_device(adap, &info);
 		if (result == NULL) {