Currently all known commands have PGN in the payload. If size is too small, there is no space for PGN and we can't create properly formatted abort message. So, instead of producing bogus abort messages, just ignore unknown or boggy packages. Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> --- net/can/j1939/transport.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c index 2a167f7807bc..5fe919cead29 100644 --- a/net/can/j1939/transport.c +++ b/net/can/j1939/transport.c @@ -1651,10 +1651,8 @@ int j1939_tp_recv(struct j1939_priv *priv, struct sk_buff *skb) case J1939_ETP_PGN_CTL: skcb->addr.type = J1939_ETP; case J1939_TP_PGN_CTL: /* falltrough */ - if (skb->len < 8) { - j1939_xtp_rx_bad_message(priv, skb); - break; - } + if (skb->len < 8) + return 0; /* Don't care. Nothing to extract here */ j1939_tp_cmd_recv(priv, skb); break; -- 2.20.1