OpenVZ Forum


Home » Mailing lists » Devel » [NET][IA64] Unaligned access in sk_run_filter
[NET][IA64] Unaligned access in sk_run_filter [message #1708] Mon, 20 February 2006 15:28 Go to next message
Mishin Dmitry is currently offline  Mishin Dmitry
Messages: 112
Registered: February 2006
Senior Member
Hello,

We have an issue on ia64 box. It is easy triggerable 'kernel unaligned access'
in sk_run_filter:
ptr = load_pointer(skb, k, 4, &tmp);
if (ptr != NULL) {
A = ntohl(*(u32 *)ptr); << here
continue;
}

due to 'k' is coming from userspace it can be easy triggered, e.g.:
[root@node1 ~]# tcpdump -i eth0 'ip[1:2]=0'

Could you advise how to fix this?

--
Thanks,
Dmitry.
Re: [NET][IA64] Unaligned access in sk_run_filter [message #1717 is a reply to message #1708] Mon, 20 February 2006 15:43 Go to previous message
Jes Sorensen is currently offline  Jes Sorensen
Messages: 5
Registered: February 2006
Junior Member
>>>>> "Dmitry" == Dmitry Mishin <dim@openvz.org> writes:

Dmitry> Hello, We have an issue on ia64 box. It is easy triggerable
Dmitry> 'kernel unaligned access' in sk_run_filter:

Dmitry> ptr = load_pointer(skb, k, 4, &tmp);
Dmitry> if (ptr != NULL) {
Dmitry> A = ntohl(*(u32 *)ptr); << here

Change the above line to something like this:

A = ntohl(get_unaligned((u32*)ptr));

And add an #include <asm/unaligned.h>

Cheers,
Jes
Previous Topic: [PATCH 1/4] Virtualization/containers: introduction
Next Topic: vzmemcheck displays wrong values?
Goto Forum:
  


Current Time: Sun Jul 20 09:49:37 GMT 2025

Total time taken to generate the page: 0.10884 seconds