Showing error 1891

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: net/ipv6/ip6_output.c
Line in file: 272
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

 242
 243        /* Allow local fragmentation. */
 244        if (ipfragok)
 245                skb->local_df = 1;
 246
 247        /*
 248         *        Fill in the IPv6 header
 249         */
 250
 251        hlimit = -1;
 252        if (np)
 253                hlimit = np->hop_limit;
 254        if (hlimit < 0)
 255                hlimit = ip6_dst_hoplimit(dst);
 256
 257        tclass = -1;
 258        if (np)
 259                tclass = np->tclass;
 260        if (tclass < 0)
 261                tclass = 0;
 262
 263        *(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | fl->fl6_flowlabel;
 264
 265        hdr->payload_len = htons(seg_len);
 266        hdr->nexthdr = proto;
 267        hdr->hop_limit = hlimit;
 268
 269        ipv6_addr_copy(&hdr->saddr, &fl->fl6_src);
 270        ipv6_addr_copy(&hdr->daddr, first_hop);
 271
 272        skb->priority = sk->sk_priority;
 273        skb->mark = sk->sk_mark;
 274
 275        mtu = dst_mtu(dst);
 276        if ((skb->len <= mtu) || skb->local_df || skb_is_gso(skb)) {
 277                IP6_INC_STATS(net, ip6_dst_idev(skb->dst),
 278                              IPSTATS_MIB_OUTREQUESTS);
 279                return NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev,
 280                                dst_output);
 281        }
 282
Show full sources