From: Dan Carpenter <hidden> Date: 2011-01-07 20:38:09
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.
http://marc.info/?l=full-disclosure&m=129424528425330&w=2
If you have already have CAP_SYS_ADMIN then you could use the bugs to
get root, or someone could cause an oops by mistake.
Signed-off-by: Dan Carpenter <redacted>
From: David Miller <davem@davemloft.net> Date: 2011-01-10 00:45:17
From: Dan Carpenter <redacted>
Date: Fri, 7 Jan 2011 23:37:55 +0300
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.
http://marc.info/?l=full-disclosure&m=129424528425330&w=2
If you have already have CAP_SYS_ADMIN then you could use the bugs to
get root, or someone could cause an oops by mistake.
Signed-off-by: Dan Carpenter <redacted>
From: David Miller <davem@davemloft.net> Date: 2011-01-10 02:13:06
From: David Miller <davem@davemloft.net>
Date: Sun, 09 Jan 2011 16:45:48 -0800 (PST)
From: Dan Carpenter <redacted>
Date: Fri, 7 Jan 2011 23:37:55 +0300
quoted
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.
http://marc.info/?l=full-disclosure&m=129424528425330&w=2
If you have already have CAP_SYS_ADMIN then you could use the bugs to
get root, or someone could cause an oops by mistake.
Signed-off-by: Dan Carpenter <redacted>
Applied and queued up for -stable, thanks Dan.
Actually I'm reverting this.
You can't change the prototype of pn_socket_create() because if you do
then it doesn't match up with the prototype required by
net_proto_family->create().
You didn't see this warning in your build?
net/phonet/af_phonet.c:124:2: warning: initialization from incompatible pointer type
On Friday 07 January 2011 22:37:55 ext Dan Carpenter, you wrote:
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.
There are two ways to solve this: change *only* the proto_get function to use
an unsigned parameter, or cast the protocol to unsigned in the comparison.
As David pointed out, your patch breaks the socket() callback prototype.
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
From: Dan Carpenter <hidden> Date: 2011-01-10 14:02:07
On Mon, Jan 10, 2011 at 09:58:32AM +0200, Rémi Denis-Courmont wrote:
On Friday 07 January 2011 22:37:55 ext Dan Carpenter, you wrote:
quoted
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.
There are two ways to solve this: change *only* the proto_get function to use
an unsigned parameter, or cast the protocol to unsigned in the comparison.
As David pointed out, your patch breaks the socket() callback prototype.
Yes. I really appologize for that. I'll send version 2 with that create()
change dropped. It's not needed.
I would like to keep the change to phonet_proto_register() because the
check in there isn't right and it's similar to phonet_proto_get(). We
may as well keep phonet_proto_unregister() as well so it's symmetric.
Let me know if you disagree and I'll redo it.
regards,
dan carpenter
From: Dan Carpenter <hidden> Date: 2011-01-10 14:07:22
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.
http://marc.info/?l=full-disclosure&m=129424528425330&w=2
The problem is that we check for array overflows but "protocol" is
signed and we don't check for array underflows. If you have already
have CAP_SYS_ADMIN then you could use the bugs to get root, or someone
could cause an oops by mistake.
Signed-off-by: Dan Carpenter <redacted>
---
v2: in v1 I changed pn_socket_create() but that change caused a
compiler warning. That part of the patch wasn't needed so I've just
dropped.
On Monday 10 January 2011 16:01:41 ext Dan Carpenter, you wrote:
I would like to keep the change to phonet_proto_register() because the
check in there isn't right and it's similar to phonet_proto_get(). We
may as well keep phonet_proto_unregister() as well so it's symmetric.
Let me know if you disagree and I'll redo it.
Sounds sensible to me.
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
On Monday 10 January 2011 16:06:58 ext Dan Carpenter, you wrote:
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.
http://marc.info/?l=full-disclosure&m=129424528425330&w=2
The problem is that we check for array overflows but "protocol" is
signed and we don't check for array underflows. If you have already
have CAP_SYS_ADMIN then you could use the bugs to get root, or someone
could cause an oops by mistake.
Signed-off-by: Dan Carpenter <redacted>
Acked-by: Rémi Denis-Courmont <redacted>
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
From: David Miller <davem@davemloft.net> Date: 2011-01-11 00:05:49
From: Dan Carpenter <redacted>
Date: Mon, 10 Jan 2011 17:06:58 +0300
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.
http://marc.info/?l=full-disclosure&m=129424528425330&w=2
The problem is that we check for array overflows but "protocol" is
signed and we don't check for array underflows. If you have already
have CAP_SYS_ADMIN then you could use the bugs to get root, or someone
could cause an oops by mistake.
Signed-off-by: Dan Carpenter <redacted>
On Tuesday 11 January 2011 02:06:20 ext David Miller, you wrote:
From: Dan Carpenter <redacted>
Date: Mon, 10 Jan 2011 17:06:58 +0300
quoted
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.
http://marc.info/?l=full-disclosure&m=129424528425330&w=2
The problem is that we check for array overflows but "protocol" is
signed and we don't check for array underflows. If you have already
have CAP_SYS_ADMIN then you could use the bugs to get root, or someone
could cause an oops by mistake.
Signed-off-by: Dan Carpenter <redacted>
Applied.
Shouldn't this be sent to stable trees?
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
On Tuesday 11 January 2011 02:06:20 ext David Miller, you wrote:
quoted
From: Dan Carpenter <redacted>
Date: Mon, 10 Jan 2011 17:06:58 +0300
quoted
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.
http://marc.info/?l=full-disclosure&m=129424528425330&w=2
The problem is that we check for array overflows but "protocol" is
signed and we don't check for array underflows. If you have already
have CAP_SYS_ADMIN then you could use the bugs to get root, or someone
could cause an oops by mistake.
Signed-off-by: Dan Carpenter <redacted>