* [PATCH] egalax_ts_serial: Fix potential buffer overflow
@ 2023-11-17 12:43 Zoltán Böszörményi
0 siblings, 0 replies; 5+ messages in thread
From: Zoltán Böszörményi @ 2023-11-17 12:43 UTC (permalink / raw)
To: linux-kernel
Cc: dmitry.torokhov, Zoltán Böszörményi,
kernel test robot
Update my old (defunct) email addresses in passing.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311171716.uIQY5rT4-lkp@intel.com/
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
CREDITS | 3 ++-
drivers/input/touchscreen/egalax_ts_serial.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/CREDITS b/CREDITS
index f33a33fd2371..5efccb40d577 100644
--- a/CREDITS
+++ b/CREDITS
@@ -470,8 +470,9 @@ S: Montreal, Quebec
S: Canada
N: Zoltán Böszörményi
-E: zboszor@mail.externet.hu
+E: zboszor@gmail.com
D: MTRR emulation with Cyrix style ARR registers, Athlon MTRR support
+D: eGalax serial touchscreen support
N: John Boyd
E: boyd@cis.ohio-state.edu
diff --git a/drivers/input/touchscreen/egalax_ts_serial.c b/drivers/input/touchscreen/egalax_ts_serial.c
index 375922d3a6d1..f8b56896a42f 100644
--- a/drivers/input/touchscreen/egalax_ts_serial.c
+++ b/drivers/input/touchscreen/egalax_ts_serial.c
@@ -2,7 +2,7 @@
/*
* EETI Egalax serial touchscreen driver
*
- * Copyright (c) 2015 Zoltán Böszörményi <zboszor@pr.hu>
+ * Copyright (c) 2015 Zoltán Böszörményi <zboszor@gmail.com>
*
* based on the
*
@@ -42,7 +42,7 @@ struct egalax {
struct serio *serio;
int idx;
u8 data[EGALAX_FORMAT_MAX_LENGTH];
- char phys[32];
+ char phys[NAME_MAX];
};
static void egalax_process_data(struct egalax *egalax)
@@ -185,6 +185,6 @@ static struct serio_driver egalax_drv = {
};
module_serio_driver(egalax_drv);
-MODULE_AUTHOR("Zoltán Böszörményi <zboszor@pr.hu>");
+MODULE_AUTHOR("Zoltán Böszörményi <zboszor@gmail.com>");
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL v2");
--
2.42.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] egalax_ts_serial: Fix potential buffer overflow
2023-12-03 18:35 ` Dmitry Torokhov
@ 2023-12-04 6:38 ` Böszörményi Zoltán
0 siblings, 0 replies; 5+ messages in thread
From: Böszörményi Zoltán @ 2023-12-04 6:38 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: linux-kernel, oe-kbuild-all, zboszormenyi, kernel test robot
2023. 12. 03. 19:35 keltezéssel, Dmitry Torokhov írta:
> Hi Zoltán,
>
> On Sun, Dec 03, 2023 at 10:06:00AM +0100, Zoltán Böszörményi wrote:
>> @@ -42,7 +42,7 @@ struct egalax {
>> struct serio *serio;
>> int idx;
>> u8 data[EGALAX_FORMAT_MAX_LENGTH];
>> - char phys[32];
>> + char phys[NAME_MAX];
> This simply wastes 200+ bytes for no good reason. It is perfectly fine
> to truncate phys string (which does not happen in practice).
Okay, I modified the phys[] array to just be 40 bytes.
That's not that wasteful and still avoids the warning.
I noticed that other TS drivers emit the same warning.
>
> If you feel strongly about it then maybe use devm_kasprintf() to
> allocate the needed buffer.
>
> Thanks.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] egalax_ts_serial: Fix potential buffer overflow
2023-12-03 9:06 ` [PATCH] egalax_ts_serial: Fix potential buffer overflow Zoltán Böszörményi
@ 2023-12-03 18:35 ` Dmitry Torokhov
2023-12-04 6:38 ` Böszörményi Zoltán
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2023-12-03 18:35 UTC (permalink / raw)
To: Zoltán Böszörményi
Cc: linux-kernel, oe-kbuild-all, zboszormenyi, kernel test robot
Hi Zoltán,
On Sun, Dec 03, 2023 at 10:06:00AM +0100, Zoltán Böszörményi wrote:
> @@ -42,7 +42,7 @@ struct egalax {
> struct serio *serio;
> int idx;
> u8 data[EGALAX_FORMAT_MAX_LENGTH];
> - char phys[32];
> + char phys[NAME_MAX];
This simply wastes 200+ bytes for no good reason. It is perfectly fine
to truncate phys string (which does not happen in practice).
If you feel strongly about it then maybe use devm_kasprintf() to
allocate the needed buffer.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] egalax_ts_serial: Fix potential buffer overflow
2023-12-03 6:07 drivers/input/touchscreen/egalax_ts_serial.c:116:21: warning: '/input0' directive output may be truncated writing 7 bytes into a region of size between 1 and 32 kernel test robot
@ 2023-12-03 9:06 ` Zoltán Böszörményi
2023-12-03 18:35 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Zoltán Böszörményi @ 2023-12-03 9:06 UTC (permalink / raw)
To: linux-kernel
Cc: oe-kbuild-all, Dmitry Torokhov, zboszormenyi,
Zoltán Böszörményi, kernel test robot
Update my old (defunct) email addresses in passing.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311171716.uIQY5rT4-lkp@intel.com/
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
CREDITS | 3 ++-
drivers/input/touchscreen/egalax_ts_serial.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/CREDITS b/CREDITS
index f33a33fd2371..5efccb40d577 100644
--- a/CREDITS
+++ b/CREDITS
@@ -470,8 +470,9 @@ S: Montreal, Quebec
S: Canada
N: Zoltán Böszörményi
-E: zboszor@mail.externet.hu
+E: zboszor@gmail.com
D: MTRR emulation with Cyrix style ARR registers, Athlon MTRR support
+D: eGalax serial touchscreen support
N: John Boyd
E: boyd@cis.ohio-state.edu
diff --git a/drivers/input/touchscreen/egalax_ts_serial.c b/drivers/input/touchscreen/egalax_ts_serial.c
index 375922d3a6d1..f8b56896a42f 100644
--- a/drivers/input/touchscreen/egalax_ts_serial.c
+++ b/drivers/input/touchscreen/egalax_ts_serial.c
@@ -2,7 +2,7 @@
/*
* EETI Egalax serial touchscreen driver
*
- * Copyright (c) 2015 Zoltán Böszörményi <zboszor@pr.hu>
+ * Copyright (c) 2015 Zoltán Böszörményi <zboszor@gmail.com>
*
* based on the
*
@@ -42,7 +42,7 @@ struct egalax {
struct serio *serio;
int idx;
u8 data[EGALAX_FORMAT_MAX_LENGTH];
- char phys[32];
+ char phys[NAME_MAX];
};
static void egalax_process_data(struct egalax *egalax)
@@ -185,6 +185,6 @@ static struct serio_driver egalax_drv = {
};
module_serio_driver(egalax_drv);
-MODULE_AUTHOR("Zoltán Böszörményi <zboszor@pr.hu>");
+MODULE_AUTHOR("Zoltán Böszörményi <zboszor@gmail.com>");
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL v2");
--
2.42.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] egalax_ts_serial: Fix potential buffer overflow
2023-11-17 9:43 drivers/input/touchscreen/egalax_ts_serial.c:116:21: warning: '/input0' directive output may be truncated writing 7 bytes into a region of size between 1 and 32 kernel test robot
@ 2023-12-03 9:05 ` Zoltán Böszörményi
0 siblings, 0 replies; 5+ messages in thread
From: Zoltán Böszörményi @ 2023-12-03 9:05 UTC (permalink / raw)
To: linux-kernel
Cc: oe-kbuild-all, Dmitry Torokhov, zboszormenyi,
Zoltán Böszörményi, kernel test robot
Update my old (defunct) email addresses in passing.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311171716.uIQY5rT4-lkp@intel.com/
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
CREDITS | 3 ++-
drivers/input/touchscreen/egalax_ts_serial.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/CREDITS b/CREDITS
index f33a33fd2371..5efccb40d577 100644
--- a/CREDITS
+++ b/CREDITS
@@ -470,8 +470,9 @@ S: Montreal, Quebec
S: Canada
N: Zoltán Böszörményi
-E: zboszor@mail.externet.hu
+E: zboszor@gmail.com
D: MTRR emulation with Cyrix style ARR registers, Athlon MTRR support
+D: eGalax serial touchscreen support
N: John Boyd
E: boyd@cis.ohio-state.edu
diff --git a/drivers/input/touchscreen/egalax_ts_serial.c b/drivers/input/touchscreen/egalax_ts_serial.c
index 375922d3a6d1..f8b56896a42f 100644
--- a/drivers/input/touchscreen/egalax_ts_serial.c
+++ b/drivers/input/touchscreen/egalax_ts_serial.c
@@ -2,7 +2,7 @@
/*
* EETI Egalax serial touchscreen driver
*
- * Copyright (c) 2015 Zoltán Böszörményi <zboszor@pr.hu>
+ * Copyright (c) 2015 Zoltán Böszörményi <zboszor@gmail.com>
*
* based on the
*
@@ -42,7 +42,7 @@ struct egalax {
struct serio *serio;
int idx;
u8 data[EGALAX_FORMAT_MAX_LENGTH];
- char phys[32];
+ char phys[NAME_MAX];
};
static void egalax_process_data(struct egalax *egalax)
@@ -185,6 +185,6 @@ static struct serio_driver egalax_drv = {
};
module_serio_driver(egalax_drv);
-MODULE_AUTHOR("Zoltán Böszörményi <zboszor@pr.hu>");
+MODULE_AUTHOR("Zoltán Böszörményi <zboszor@gmail.com>");
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL v2");
--
2.42.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-04 6:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-17 12:43 [PATCH] egalax_ts_serial: Fix potential buffer overflow Zoltán Böszörményi
-- strict thread matches above, loose matches on Subject: below --
2023-12-03 6:07 drivers/input/touchscreen/egalax_ts_serial.c:116:21: warning: '/input0' directive output may be truncated writing 7 bytes into a region of size between 1 and 32 kernel test robot
2023-12-03 9:06 ` [PATCH] egalax_ts_serial: Fix potential buffer overflow Zoltán Böszörményi
2023-12-03 18:35 ` Dmitry Torokhov
2023-12-04 6:38 ` Böszörményi Zoltán
2023-11-17 9:43 drivers/input/touchscreen/egalax_ts_serial.c:116:21: warning: '/input0' directive output may be truncated writing 7 bytes into a region of size between 1 and 32 kernel test robot
2023-12-03 9:05 ` [PATCH] egalax_ts_serial: Fix potential buffer overflow Zoltán Böszörményi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®