<div dir="ltr"><div dir="ltr"><div>From: Julian Wiedmann <<a href="mailto:jwi@linux.ibm.com">jwi@linux.ibm.com</a>></div><div><br></div><div>BugLink: <a href="http://bugs.launchpad.net/bugs/1800639">http://bugs.launchpad.net/bugs/1800639</a></div><div><br></div><div>net/af_iucv: drop inbound packets with invalid flags</div><div>    </div><div>Inbound packets may have any combination of flag bits set in their iucv</div><div>header. If we don't know how to handle a specific combination, drop the</div><div>skb instead of leaking it.</div><div>    </div><div>To clarify what error is returned in this case, replace the hard-coded</div><div>0 with the corresponding macro.</div><div>    </div><div>Signed-off-by: Julian Wiedmann <<a href="mailto:jwi@linux.ibm.com">jwi@linux.ibm.com</a>></div><div>Signed-off-by: David S. Miller <<a href="mailto:davem@davemloft.net">davem@davemloft.net</a>></div><div>(cherry-picked from commit 222440996d6daf635bed6cb35041be22ede3e8a0)</div><div>Signed-off-by: Frank Heimes <<a href="mailto:frank.heimes@canonical.com">frank.heimes@canonical.com</a>></div><div><br></div><div>---</div><div><br></div><div>diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c</div><div>index a21d8ed..01000c1 100644</div><div>--- a/net/iucv/af_iucv.c</div><div>+++ b/net/iucv/af_iucv.c</div><div>@@ -2155,8 +2155,8 @@ static int afiucv_hs_rcv(struct sk_buff *skb, struct net_device *dev,</div><div>        struct sock *sk;</div><div>        struct iucv_sock *iucv;</div><div>        struct af_iucv_trans_hdr *trans_hdr;</div><div>+       int err = NET_RX_SUCCESS;</div><div>        char nullstring[8];</div><div>-       int err = 0;</div><div> </div><div>        if (skb->len < (ETH_HLEN + sizeof(struct af_iucv_trans_hdr))) {</div><div>                WARN_ONCE(1, "AF_IUCV too short skb, len=%d, min=%d",</div><div>@@ -2254,7 +2254,7 @@ static int afiucv_hs_rcv(struct sk_buff *skb, struct net_device *dev,</div><div>                err = afiucv_hs_callback_rx(sk, skb);</div><div>                break;</div><div>        default:</div><div>-               ;</div><div>+               kfree_skb(skb);</div><div>        }</div><div> </div><div>        return err;</div><div><br></div></div></div>