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  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:	Thu, 17 Apr 2008 23:16:22 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	gerrit@....abdn.ac.uk
Cc:	netdev@...r.kernel.org
Subject: Re: [COMPAT]: non-cmsg data gets interpreted as cmsg data (sparc64)

From: Gerrit Renker <gerrit@....abdn.ac.uk>
Date: Thu, 17 Apr 2008 14:08:37 +0100

> The following code segment works without problems on IA-32:
> 
> 	uint32_t prio = 10;
> 	struct msghdr msg;
> 
> 	// fill in iov bits of msg
> 	// ...
> 	msg.msg_control	   = &prio;
> 	msg.msg_controllen = sizeof prio;
> 
> 	if (sendmsg(sockfd, &msg, 0))
> 		err(1, "sendmsg failed");

It works in non-compat situations only by accident.

You have to use proper CMSG encoding to send things into the kernel
vis the msg_control area.

Modify your interface such that it properly encapsulates your priority
value in a proper CMSG blob and all will work.
--
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