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]
Date:	Wed, 14 Nov 2007 09:26:18 +0000 (GMT)
From:	Nj A <nj_a83@...oo.fr>
To:	netdev@...r.kernel.org
Subject: Bug in using inet_lookup ()

Dear All,
I need to use the inet_lookup function to find the sock structure of a TCP connection in a SYN_RECV state.
Here is what I used to do so:
/* The kernel TCP hashtable */
struct inet_hashinfo __cacheline_aligned tcp_hashinfo = {
.lhash_lock = __RW_LOCK_UNLOCKED (tcp_hashinfo.lhash_lock),
.lhash_users = ATOMIC_INIT (0),
.lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER (tcp_hashinfo.lhash_wait),
};
...
struct sock *sk;
struct sk_buff *skb;
skb = alloc_skb (MAX_TCP_HEADER + 15, GFP_KERNEL);
if (skb == NULL)
printk ("%s: Unable to allocate memory \n", __FUNCTION__);
sk = inet_lookup (&tcp_hashinfo, ip_src, src_port, ip_dst, dst_port, inet_iif (skb));
if (!sk)
...
This portion of code seems to cause the kernel to panic due to dereferencing a NULL pointer.
Can anyone please tell me what is the error above?
Best Regards,


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
-
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