[Patch] Correct assignment of uid to gid in credentials

Subsystems: networking [general], networking [sockets], the rest

STALE5545d

7 messages, 5 authors, 2011-08-11 · open the first message on its own page

[Patch] Correct assignment of uid to gid in credentials

From: Tim Chen <hidden>
Date: 2011-08-08 22:07:47

This patch corrects an erroneous assignment of uid to gid in credentials
update.

Tim

Signed-off-by: Tim Chen <redacted>
diff --git a/net/core/scm.c b/net/core/scm.c
index 4c1ef02..811b53f 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -192,7 +192,7 @@ int __scm_send(struct socket *sock, struct msghdr
*msg, struct scm_cookie *p)
 					goto error;
 
 				cred->uid = cred->euid = p->creds.uid;
-				cred->gid = cred->egid = p->creds.uid;
+				cred->gid = cred->egid = p->creds.gid;
 				put_cred(p->cred);
 				p->cred = cred;
 			}

Re: [Patch] Correct assignment of uid to gid in credentials

From: Eric Dumazet <hidden>
Date: 2011-08-09 02:44:03

Le lundi 08 août 2011 à 15:08 -0700, Tim Chen a écrit :
quoted hunk
This patch corrects an erroneous assignment of uid to gid in credentials
update.

Tim

Signed-off-by: Tim Chen <redacted>
diff --git a/net/core/scm.c b/net/core/scm.c
index 4c1ef02..811b53f 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -192,7 +192,7 @@ int __scm_send(struct socket *sock, struct msghdr
*msg, struct scm_cookie *p)
 					goto error;
 
 				cred->uid = cred->euid = p->creds.uid;
-				cred->gid = cred->egid = p->creds.uid;
+				cred->gid = cred->egid = p->creds.gid;
 				put_cred(p->cred);
 				p->cred = cred;
 			}
Good catch Tim.

BTW your patch is a bit flawed : one wrapped line and "---" marker
missing.

Could you add in Changelog bug came from commit 257b5358b32f17
(scm: Capture the full credentials of the scm sender) to ease stable
teams work ?
(linux-2.6.36 was the first kernel to include this commit)

[Patch] scm: Capture the full credentials of the scm sender

From: Tim Chen <hidden>
Date: 2011-08-09 16:47:37

On Tue, 2011-08-09 at 04:43 +0200, Eric Dumazet wrote:
Good catch Tim.

BTW your patch is a bit flawed : one wrapped line and "---" marker
missing.

Could you add in Changelog bug came from commit 257b5358b32f17
(scm: Capture the full credentials of the scm sender) to ease stable
teams work ?
(linux-2.6.36 was the first kernel to include this commit)

Updated the log as requested.  Thanks.

Tim

------------

This patch corrects an erroneous update of credential's gid with uid
introduced in commit 257b5358b32f17 since 2.6.36.

Signed-off-by: Tim Chen <redacted>
---
diff --git a/net/core/scm.c b/net/core/scm.c
index 4c1ef02..811b53f 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -192,7 +192,7 @@ int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p)
 					goto error;
 
 				cred->uid = cred->euid = p->creds.uid;
-				cred->gid = cred->egid = p->creds.uid;
+				cred->gid = cred->egid = p->creds.gid;
 				put_cred(p->cred);
 				p->cred = cred;
 			}

Re: [Patch] scm: Capture the full credentials of the scm sender

From: Andi Kleen <hidden>
Date: 2011-08-09 18:06:41

This patch corrects an erroneous update of credential's gid with uid
introduced in commit 257b5358b32f17 since 2.6.36.

Please also add a Cc: stable@kernel.org

-Andi

Re: [Patch] scm: Capture the full credentials of the scm sender

From: Eric Dumazet <hidden>
Date: 2011-08-09 18:12:22

Le mardi 09 août 2011 à 11:06 -0700, Andi Kleen a écrit :
quoted
This patch corrects an erroneous update of credential's gid with uid
introduced in commit 257b5358b32f17 since 2.6.36.

Please also add a Cc: stable@kernel.org
David handles stable submission himself, a priori.

Acked-by: Eric Dumazet <redacted>

Re: [Patch] scm: Capture the full credentials of the scm sender

From: James Morris <jmorris@namei.org>
Date: 2011-08-09 23:21:06

On Tue, 9 Aug 2011, Tim Chen wrote:
This patch corrects an erroneous update of credential's gid with uid
introduced in commit 257b5358b32f17 since 2.6.36.

Signed-off-by: Tim Chen <redacted>
Reviewed-by: James Morris <jmorris@namei.org>

-- 
James Morris
[off-list ref]

Re: [Patch] scm: Capture the full credentials of the scm sender

From: David Miller <davem@davemloft.net>
Date: 2011-08-11 12:51:40

From: Tim Chen <redacted>
Date: Tue, 09 Aug 2011 09:48:32 -0700
This patch corrects an erroneous update of credential's gid with uid
introduced in commit 257b5358b32f17 since 2.6.36.

Signed-off-by: Tim Chen <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help