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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100226.011751.20505389.davem@davemloft.net>
Date:	Fri, 26 Feb 2010 01:17:51 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	fwestphal@...aro.com
Cc:	netdev@...r.kernel.org, johannes@...solutions.net
Subject: Re: [PATCH 5/5] net: sock_aio_write: set CMSG_MSG_COMPAT flag if
 is_compat_task

From: David Miller <davem@...emloft.net>
Date: Fri, 26 Feb 2010 01:16:46 -0800 (PST)

> From: Florian Westphal <fwestphal@...aro.com>
> Date: Fri, 19 Feb 2010 13:41:47 +0100
> 
>> @@ -837,6 +837,10 @@ static ssize_t do_sock_write(struct msghdr *msg, struct kiocb *iocb,
>>  	msg->msg_iov = (struct iovec *)iov;
>>  	msg->msg_iovlen = nr_segs;
>>  	msg->msg_flags = (file->f_flags & O_NONBLOCK) ? MSG_DONTWAIT : 0;
>> +#ifdef CONFIG_COMPAT
>> +	if (is_compat_task())
>> +		msg->msg_flags |= MSG_CMSG_COMPAT;
>> +#endif
>>  	if (sock->type == SOCK_SEQPACKET)
>>  		msg->msg_flags |= MSG_EOR;
>>  
> 
> What if the kernel itself does a socket write, say from a software
> interrupt or to generate events in response to a user event,
> and the current process happens to be a compat task?

BTW, it's again another example of why is_compat_task() is almost
always the wrong thing to use.

--
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