Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1214876 > unrolled thread
| Started by | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| First post | 2015-08-28 00:30 +0200 |
| Last post | 2015-08-28 01:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 3.19.y-ckt 016/130] Input: zforce - don't overwrite the stack Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-08-28 00:30 +0200
Re: [PATCH 3.19.y-ckt 016/130] Input: zforce - don't overwrite the stack Kamal Mostafa <kamal@canonical.com> - 2015-08-28 01:20 +0200
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2015-08-28 00:30 +0200 |
| Subject | Re: [PATCH 3.19.y-ckt 016/130] Input: zforce - don't overwrite the stack |
| Message-ID | <q2dQd-YC-1@gated-at.bofh.it> |
On August 27, 2015 3:10:07 PM PDT, Kamal Mostafa <kamal@canonical.com> wrote:
>3.19.8-ckt6 -stable review patch. If anyone has any objections, please
>let me know.
Bad patch, reverted in mainline, please drop.
>
>------------------
>
>From: Oleksij Rempel <external.Oleksij.Rempel@de.bosch.com>
>
>commit 7d01cd261c76f95913c81554a751968a1d282d3a upstream.
>
>If we get a corrupted packet with PAYLOAD_LENGTH > FRAME_MAXSIZE, we
>will silently overwrite the stack.
>
>Signed-off-by: Oleksij Rempel <external.Oleksij.Rempel@de.bosch.com>
>Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
>Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>Signed-off-by: Kamal Mostafa <kamal@canonical.com>
>---
> drivers/input/touchscreen/zforce_ts.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/input/touchscreen/zforce_ts.c
>b/drivers/input/touchscreen/zforce_ts.c
>index 19880c7..a9e1ee3 100644
>--- a/drivers/input/touchscreen/zforce_ts.c
>+++ b/drivers/input/touchscreen/zforce_ts.c
>@@ -430,7 +430,7 @@ static int zforce_read_packet(struct zforce_ts *ts,
>u8 *buf)
> goto unlock;
> }
>
>- if (buf[PAYLOAD_LENGTH] == 0) {
>+ if (buf[PAYLOAD_LENGTH] == 0 || buf[PAYLOAD_LENGTH] > FRAME_MAXSIZE)
>{
> dev_err(&client->dev, "invalid payload length: %d\n",
> buf[PAYLOAD_LENGTH]);
> ret = -EIO;
Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2015-08-28 01:20 +0200 |
| Subject | Re: [PATCH 3.19.y-ckt 016/130] Input: zforce - don't overwrite the stack |
| Message-ID | <q2eCB-2a3-15@gated-at.bofh.it> |
| In reply to | #1214876 |
On Thu, 2015-08-27 at 15:24 -0700, Dmitry Torokhov wrote:
> On August 27, 2015 3:10:07 PM PDT, Kamal Mostafa <kamal@canonical.com> wrote:
> >3.19.8-ckt6 -stable review patch. If anyone has any objections, please
> >let me know.
>
> Bad patch, reverted in mainline, please drop.
OK, dropped from 3.19-stable. Thanks Dmitry!
-Kamal
> >
> >------------------
> >
> >From: Oleksij Rempel <external.Oleksij.Rempel@de.bosch.com>
> >
> >commit 7d01cd261c76f95913c81554a751968a1d282d3a upstream.
> >
> >If we get a corrupted packet with PAYLOAD_LENGTH > FRAME_MAXSIZE, we
> >will silently overwrite the stack.
> >
> >Signed-off-by: Oleksij Rempel <external.Oleksij.Rempel@de.bosch.com>
> >Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
> >Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> >Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> >---
> > drivers/input/touchscreen/zforce_ts.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/drivers/input/touchscreen/zforce_ts.c
> >b/drivers/input/touchscreen/zforce_ts.c
> >index 19880c7..a9e1ee3 100644
> >--- a/drivers/input/touchscreen/zforce_ts.c
> >+++ b/drivers/input/touchscreen/zforce_ts.c
> >@@ -430,7 +430,7 @@ static int zforce_read_packet(struct zforce_ts *ts,
> >u8 *buf)
> > goto unlock;
> > }
> >
> >- if (buf[PAYLOAD_LENGTH] == 0) {
> >+ if (buf[PAYLOAD_LENGTH] == 0 || buf[PAYLOAD_LENGTH] > FRAME_MAXSIZE)
> >{
> > dev_err(&client->dev, "invalid payload length: %d\n",
> > buf[PAYLOAD_LENGTH]);
> > ret = -EIO;
>
>
> Thanks.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web