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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 24 Sep 2010 15:52:13 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Kumar A Sanghvi <kumar.sanghvi@...ricsson.com>
Cc:	remi.denis-courmont@...ia.com, davem@...emloft.net,
	netdev@...r.kernel.org, STEricsson_nomadik_linux@...t.st.com,
	sudeep.divakaran@...ricsson.com, gulshan.karmani@...ricsson.com,
	Linus Walleij <linus.walleij@...ricsson.com>
Subject: Re: [PATCH 1/2] Phonet: Implement Pipe Controller to support Nokia
 Slim Modems

Le vendredi 24 septembre 2010 à 17:53 +0530, Kumar A Sanghvi a écrit :

> +static int pipe_get_flow_info(struct sock *sk, struct sk_buff *skb,
> +		u8 *pref_rx_fc, u8 *req_tx_fc)
> +{
> +	struct pnpipehdr *hdr = pnp_hdr(skb);
> +	u8 n_sb;
> +
> +	if (!pskb_may_pull(skb, sizeof(*hdr) + 4))
> +		return -EINVAL;

This is wrong.

pskb_may_pull() might change skb->data, so you should do

{
	struct pnpipehdr *hdr;
	u8 n_sb;

	if (!pskb_may_pull(skb, sizeof(*hdr) + 4))
		return -EINVAL;

	hdr = pnp_hdr(skb);

...





--
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