[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110802.042641.2122529993066553943.davem@davemloft.net>
Date: Tue, 02 Aug 2011 04:26:41 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: penguin-kernel@...ove.sakura.ne.jp
Cc: eparis@...isplace.org, anton@...ba.org, casey@...aufler-ca.com,
mjt@....msk.ru, netdev@...r.kernel.org,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH] net: Fix security_socket_sendmsg() bypass problem.
From: David Miller <davem@...emloft.net>
Date: Tue, 02 Aug 2011 04:18:57 -0700 (PDT)
> From: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
> Date: Tue, 02 Aug 2011 18:28:40 +0900
>
>> I think this behavior is not preferable. In this case, should
>> security_socket_sendmsg() return -EAGAIN rather than -EPERM? Or,
>> should sendmmsg() not record errors after some of datagrams were
>> sent?
>
> I think you must return -EAGAIN so that the user can see how many
> of the datagrams were sent successfully.
>
> In fact, it is a requirement. What if the sent datagrams have
> side effects (f.e. money moves from one bank account to another)?
>
> How else can the application find this out?
Actually, I change my mind. :-)
I think sendmmsg() needs to unconditionally not report an error if any
datagrams were sent successfully.
--
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