lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120330200236.GH3289@mwanda>
Date:	Fri, 30 Mar 2012 23:02:37 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Sven Eckelmann <sven@...fation.org>
Cc:	b.a.t.m.a.n@...ts.open-mesh.org, netdev@...r.kernel.org
Subject: question about frag_can_reassemble()

Hi Sven,

I had a question about the code in frag_can_reassemble().

net/batman-adv/unicast.h
    51  
    52          merged_size = (skb->len - sizeof(*unicast_packet)) * 2;
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    53          merged_size += sizeof(struct unicast_packet) + uneven_correction;
    54  
    55          return merged_size <= mtu;
    56  }

Can the skb->len be less than sizeof(*unicast_packet) (ie 20 bytes)?
If "len" is less than 10 then we would return false but if it's
over 10 then we would return true.  Roughly.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ