CC: [email protected]
TO: Aya Levin <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git net-next
head:   5d0f806c7608fe61c73b31b28411ebb94b962ebf
commit: d1521c0603f22c6702c63c9354e80cd94d6c7dc6 [14/98] net: ipv6: Validate 
GSO SKB before finish IPv6 processing
:::::: branch date: 10 hours ago
:::::: commit date: 19 hours ago
config: x86_64-randconfig-m001-20201229 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
net/ipv6/ip6_output.c:154 ip6_finish_output_gso_slowpath_drop() error: 
uninitialized symbol 'ret'.

Old smatch warnings:
net/ipv6/ip6_output.c:158 ip6_finish_output_gso_slowpath_drop() error: 
uninitialized symbol 'ret'.
net/ipv6/ip6_output.c:291 ip6_xmit() error: we previously assumed 'np' could be 
null (see line 285)

vim +/ret +154 net/ipv6/ip6_output.c

^1da177e4c3f415 Linus Torvalds 2005-04-16  127  
d1521c0603f22c6 Aya Levin      2020-12-16  128  static int
d1521c0603f22c6 Aya Levin      2020-12-16  129  
ip6_finish_output_gso_slowpath_drop(struct net *net, struct sock *sk,
d1521c0603f22c6 Aya Levin      2020-12-16  130                                  
    struct sk_buff *skb, unsigned int mtu)
d1521c0603f22c6 Aya Levin      2020-12-16  131  {
d1521c0603f22c6 Aya Levin      2020-12-16  132          struct sk_buff *segs, 
*nskb;
d1521c0603f22c6 Aya Levin      2020-12-16  133          netdev_features_t 
features;
d1521c0603f22c6 Aya Levin      2020-12-16  134          int ret;
d1521c0603f22c6 Aya Levin      2020-12-16  135  
d1521c0603f22c6 Aya Levin      2020-12-16  136          /* Please see 
corresponding comment in ip_finish_output_gso
d1521c0603f22c6 Aya Levin      2020-12-16  137           * describing the cases 
where GSO segment length exceeds the
d1521c0603f22c6 Aya Levin      2020-12-16  138           * egress MTU.
d1521c0603f22c6 Aya Levin      2020-12-16  139           */
d1521c0603f22c6 Aya Levin      2020-12-16  140          features = 
netif_skb_features(skb);
d1521c0603f22c6 Aya Levin      2020-12-16  141          segs = 
skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
d1521c0603f22c6 Aya Levin      2020-12-16  142          if 
(IS_ERR_OR_NULL(segs)) {
d1521c0603f22c6 Aya Levin      2020-12-16  143                  kfree_skb(skb);
d1521c0603f22c6 Aya Levin      2020-12-16  144                  return -ENOMEM;
d1521c0603f22c6 Aya Levin      2020-12-16  145          }
d1521c0603f22c6 Aya Levin      2020-12-16  146  
d1521c0603f22c6 Aya Levin      2020-12-16  147          consume_skb(skb);
d1521c0603f22c6 Aya Levin      2020-12-16  148  
d1521c0603f22c6 Aya Levin      2020-12-16  149          
skb_list_walk_safe(segs, segs, nskb) {
d1521c0603f22c6 Aya Levin      2020-12-16  150                  int err;
d1521c0603f22c6 Aya Levin      2020-12-16  151  
d1521c0603f22c6 Aya Levin      2020-12-16  152                  
skb_mark_not_on_list(segs);
d1521c0603f22c6 Aya Levin      2020-12-16  153                  err = 
ip6_fragment(net, sk, segs, ip6_finish_output2);
d1521c0603f22c6 Aya Levin      2020-12-16 @154                  if (err && ret 
== 0)
d1521c0603f22c6 Aya Levin      2020-12-16  155                          ret = 
err;
d1521c0603f22c6 Aya Levin      2020-12-16  156          }
d1521c0603f22c6 Aya Levin      2020-12-16  157  
d1521c0603f22c6 Aya Levin      2020-12-16  158          return ret;
d1521c0603f22c6 Aya Levin      2020-12-16  159  }
d1521c0603f22c6 Aya Levin      2020-12-16  160  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to