Kernel Panic : Mac OS X 10.4.7 Intel, KPI IP Filter & VPN
Kernel Panic : Mac OS X 10.4.7 Intel, KPI IP Filter & VPN
- Subject: Kernel Panic : Mac OS X 10.4.7 Intel, KPI IP Filter & VPN
- From: Stephane <email@hidden>
- Date: Thu, 29 Jun 2006 17:34:00 +0200
Problem
-------
With a VPN connection, a KPI IP Filter is causing a Kernel Panic in
com.apple.nke.asp_tcp on Mac OS X _Intel_. It's working fine on Mac
OS X _PPC_ with or without a VPN connection.
I've been able to determine the lines of code leading to this Kernel
Panic.
Basically the code is this one:
errno_t MY_IPFilterV4_CallBack(void* cookie, mbuf_t *data, int
offset, u_int8_t protocol)
{
if (data!=NULL)
{
struct ip * tIPv4Header;
int tIPHeaderLength;
u_char tProtocol;
size_t tLength;
size_t tRequiredLength;
tIPv4Header=(struct ip *) mbuf_data(*data);
tIPHeaderLength=tIPv4Header->ip_hl*4;
tProtocol=tIPv4Header->ip_p;
switch(tProtocol)
{
case IPPROTO_TCP:
{
tLength=mbuf_len(*data);
tRequiredLength=tIPHeaderLength+14;
if (tLength < tRequiredLength)
{
if (mbuf_pullup(data, tRequiredLength)!=0)
{
return 13;
}
}
break;
}
case IPPROTO_UDP:
{
tLength=mbuf_len(*data);
tRequiredLength=tIPHeaderLength+4;
if (tLength < tRequiredLength)
{
if (mbuf_pullup(data, tRequiredLength)!=0)
{
return 13;
}
}
break;
}
}
}
return 0;
}
If I comment the whole switch case block, I don't see any Kernel Panic.
The "funny" part is that it's not kernel panicing in this code but in
com.apple.nke.asp_tcp.
Question
--------
Am I doing something completely dumb or is it a bug in OS X Intel?
For the record, I'm using similar code with an Interface Filter and
it's working fine in the same conditions.
Additional Information
----------------------
Thu Jun 29 16:29:08 2006
panic(cpu 0 caller 0x0019CADF): Unresolved kernel trap (CPU 0, Type
14=page fault), registers:
CR0: 0x80010033, CR2: 0x00000008, CR3: 0x00d56000, CR4: 0x000006e0
EAX: 0x0000004c, EBX: 0x1d108000, ECX: 0x1cfa3500, EDX: 0x000005dc
ESP: 0x00000008, EBP: 0x0b423be8, ESI: 0x00000000, EDI: 0x0000055c
EFL: 0x00010216, EIP: 0x00351938, CS: 0x00000014, DS: 0x0000001c
Backtrace, Format - Frame : Return Address (4 potential args on stack)
0xb423a48 : 0x128b5e (0x3bc46c 0xb423a6c 0x131bbc 0x0)
0xb423a88 : 0x19cadf (0x3c18e4 0x0 0xe 0x3c169c)
0xb423b38 : 0x197c7d (0xb423b4c 0xb423be8 0x351938 0x2c6b0048)
0xb423b44 : 0x351938 (0x2c6b0048 0xb42001c 0x1c 0x1c)
0xb423be8 : 0x227f26 (0x1cfa3500 0x5dc 0x5c8 0x1)
0xb423d28 : 0x22ed39 (0x1d109300 0x0 0x0 0x2161330)
0xb423e08 : 0x353e55 (0x23adb70 0x1f506e4 0x209e3e8 0x1002)
0xb423e48 : 0x363f5c (0x23ad948 0x1f506e4 0x0 0x32502f)
0xb423e88 : 0x1f5a7ed7 (0x23ad948 0x1f506e4 0x80 0x1f506e4)
0xb423ee8 : 0x353e55 (0x2305850 0x1f506e4 0x209e3e8 0x3595eb)
0xb423f28 : 0x359d67 (0x2305850 0x1f506e4 0x0 0x10)
0xb423f78 : 0x36de6c (0x209e3e8 0x227fcbc 0x227fd00 0x0)
0xb423fd8 : 0x197ff3 (0x2384d48 0x2384d48 0xb423b4c 0xb423abc) No
mapping exists for frame pointer
Backtrace terminated-invalid frame pointer 0xb009c968
Kernel loadable modules in backtrace (with dependencies):
com.apple.nke.asp_tcp(4.4.3)@0x1f5a6000
Kernel version:
Darwin Kernel Version 8.7.1: Wed Jun 7 16:19:56 PDT 2006;
root:xnu-792.9.72.obj~2/RELEASE_I386
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden