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] [day] [month] [year] [list]
Date:	Tue, 11 Sep 2007 12:57:03 -0400
From:	"Fortier,Vincent [Montreal]" <Vincent.Fortier1@...GC.CA>
To:	"Nick Bowler" <nbowler@...ipticsemi.com>
Cc:	<linux-kernel@...r.kernel.org>,
	Gélineau,Samuel [Montreal] 
	<samuel.gelineau@...gc.ca>
Subject: RE: Patch for Apani Nortel VPN Client to build against kernel 2.6.22  help/review

> -----Message d'origine-----
> De : linux-kernel-owner@...r.kernel.org 
> [mailto:linux-kernel-owner@...r.kernel.org] De la part de Nick Bowler
> 
> I haven't read too much into the patch, but some quick 
> comments.  Most applies
> throughout:
> 
> > +#if (LINUX_VERSION_CODE >= 0x020616)
> KERNEL_VERSION(2,6,22) is much more readable than 0x020616.
> 
> > +  return (struct iphdr*) skb->network_header;
> Should be return ip_hdr(skb);
> 
> > +    skb->network_header = skb->data;
> Should be skb_reset_network_header(skb);
> 
> > +    iph = skb->network_header.iph;
> Probably meant skb->nh.iph.
> 
> > +  if ( iph->protocol == 17 )            /* if UDP, */
> (snip)
> > +  if ( iph->protocol == 6 )             /* if TCP, */
> Could use IPPROTO_UDP and IPPROTO_TCP instead of 17 and 6, 
> respectively.
> 
> Instead of littering the code with #if blah #else blah, you 
> could also simply provide implementations for the 2.6.22 
> functions #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22).
> 

(Forwarding info by Samuel to lkml...)

Thanks for your comments, here is a new patch (bowler.patch) reflecting the changes you suggested. Unfortunately, and unsurprisingly for such cosmetic changes, the code still hangs.

I have added a great many debugging statements in order to pinpoint the problem (backtrace.patch); surprisingly, my custom backtraces didn't show up in the console, but a kernel call trace did (call_trace).

Here is the contents of the offending function. The {enter,exit}_func() calls are my debugging statements, and I have verified that only the else branch was compiled. As you can see, there are only function calls here, no memory manipulation nor dereferencing at all. What could possibly fail in this function? Shouldn`t the backtrace include one of the subcalls?

  void nl_spin_lock_irqsave(spinlock_t *lockptr, DWORD *flagptr)
  {
  enter_func(__LINE__);
  #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7))
          assert(lockptr);
          assert(flagptr);
          spin_lock_irqsave((spinlock_t *)lockptr, (*flagptr));
  #else
          spin_lock_irq((spinlock_t *)lockptr);
  #endif
  exit_func(__LINE__);
  }

- Samuel Gélineau

Download attachment "call_trace" of type "application/octet-stream" (1087 bytes)

Download attachment "backtrace.patch" of type "application/octet-stream" (14295 bytes)

Download attachment "bowler.patch" of type "application/octet-stream" (11041 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ