Skip to content

Commit

Permalink
can: j1939: transport: j1939_session_fresh_new(): make sure EOMA is s…
Browse files Browse the repository at this point in the history
…end with the total message size set

mainline inclusion
from mainline-v5.4-rc7
commit eaa654f
category: bugfix
bugzilla: 38684
CVE: NA

---------------------------

We were sending malformed EOMA messageswith total message size set to 0.

This patch fixes the bug.

Reported-by: linux-can/can-utils#159
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Reviewed-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
  • Loading branch information
olerem authored and Yang Yingliang committed Jul 7, 2020
1 parent 852a5b9 commit deea480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/can/j1939/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv,
skcb = j1939_skb_to_cb(skb);
memcpy(skcb, rel_skcb, sizeof(*skcb));

session = j1939_session_new(priv, skb, skb->len);
session = j1939_session_new(priv, skb, size);
if (!session) {
kfree_skb(skb);
return NULL;
Expand Down

0 comments on commit deea480

Please sign in to comment.