<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gss-proxy.git/proxy/src/client, branch delegate</title>
<subtitle>Work on gss-proxy before it lands upstream</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/'/>
<entry>
<title>Properly handle security contexts on error</title>
<updated>2015-03-21T18:31:04+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2015-02-26T20:49:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/commit/?id=5d5d6cb98a42a09d02b8427bfc70ba1e9505eb50'/>
<id>5d5d6cb98a42a09d02b8427bfc70ba1e9505eb50</id>
<content type='text'>
On error we need to make sure we do not return a pointer to a
security context that may have been already freed.
So make sure to always unconditionally return the context that we've
been returned by our callees.
Also reorganize the code so we do not accidently wipe the context
and leak memoy on error.

This fixed a double-free bug found by NFS folks @ Red Hat

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On error we need to make sure we do not return a pointer to a
security context that may have been already freed.
So make sure to always unconditionally return the context that we've
been returned by our callees.
Also reorganize the code so we do not accidently wipe the context
and leak memoy on error.

This fixed a double-free bug found by NFS folks @ Red Hat

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Properly cleanup mutex on failure.</title>
<updated>2014-03-12T13:03:44+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2014-03-11T22:16:32+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/commit/?id=f39b471f34b381784a1bd1906bf8335ac2c7ef5e'/>
<id>f39b471f34b381784a1bd1906bf8335ac2c7ef5e</id>
<content type='text'>
If the call to create socket fails we leave a dangling lock and the client
enters into a deadlock on the next call.

Fixes: https://fedorahosted.org/gss-proxy/ticket/121

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the call to create socket fails we leave a dangling lock and the client
enters into a deadlock on the next call.

Fixes: https://fedorahosted.org/gss-proxy/ticket/121

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add zero termination when the buffer is a string</title>
<updated>2014-01-15T14:00:03+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2013-12-27T16:38:10+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/commit/?id=d78ad1fc906d1e03b8232e4c9aab831899c26b31'/>
<id>d78ad1fc906d1e03b8232e4c9aab831899c26b31</id>
<content type='text'>
This shouldn't be needed but apaprently there are a number of applications
like mod_auth_kerb that just blindly assume the out buffer returned by
gss_diplay_name() is a zero terminated string even though there is no
guarantee it is in the API. To avoid annoying misbehavior we forcibly zero
terminate strings copied and returned by the interposer.

Fixes: https://fedorahosted.org/gss-proxy/ticket/101

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This shouldn't be needed but apaprently there are a number of applications
like mod_auth_kerb that just blindly assume the out buffer returned by
gss_diplay_name() is a zero terminated string even though there is no
guarantee it is in the API. To avoid annoying misbehavior we forcibly zero
terminate strings copied and returned by the interposer.

Fixes: https://fedorahosted.org/gss-proxy/ticket/101

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use gp_strerror() everywhere instead of strerror()</title>
<updated>2013-11-22T13:41:24+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2013-11-21T17:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/commit/?id=db8099da53167ca4ebf3b9f5ef0c702ddfe8b366'/>
<id>db8099da53167ca4ebf3b9f5ef0c702ddfe8b366</id>
<content type='text'>
https://fedorahosted.org/gss-proxy/ticket/111

Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://fedorahosted.org/gss-proxy/ticket/111

Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use secure_getenv in client and mechglue module</title>
<updated>2013-11-21T12:48:25+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2013-11-20T16:58:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/commit/?id=23f4ee4359d10f66e1938ce6b1d92d3cc77865ff'/>
<id>23f4ee4359d10f66e1938ce6b1d92d3cc77865ff</id>
<content type='text'>
proxymehc.so may be used in setuid binaries so follow best security
practices and use secure_getenv() if available.
Fallback to poorman emulation when secure_getenv() is not available.

Resolves: https://fedorahosted.org/gss-proxy/ticket/110

Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
proxymehc.so may be used in setuid binaries so follow best security
practices and use secure_getenv() if available.
Fallback to poorman emulation when secure_getenv() is not available.

Resolves: https://fedorahosted.org/gss-proxy/ticket/110

Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix continuations in context establishment calls</title>
<updated>2013-11-19T13:34:47+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2013-11-15T15:33:52+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/commit/?id=556ea844a5783f9876ee748e1c686bb268f54e8a'/>
<id>556ea844a5783f9876ee748e1c686bb268f54e8a</id>
<content type='text'>
Properly support continuations, including returning the rigth error code
and exporting partial contexts.

Fixes multistep authentications in particular for the initialization case
which always uses continuations.

Resolves: https://fedorahosted.org/gss-proxy/ticket/108

Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Properly support continuations, including returning the rigth error code
and exporting partial contexts.

Fixes multistep authentications in particular for the initialization case
which always uses continuations.

Resolves: https://fedorahosted.org/gss-proxy/ticket/108

Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Preserve requested flags and lifetime</title>
<updated>2013-11-19T13:02:42+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2013-11-13T22:57:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/commit/?id=cc538c36ca32850e0b3280b7d8524d23345eed9e'/>
<id>cc538c36ca32850e0b3280b7d8524d23345eed9e</id>
<content type='text'>
These arguments have been accidentally forgotten causing failures for
applications that specify non default flags and non indefinite lifetime.

https://fedorahosted.org/gss-proxy/ticket/106

Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These arguments have been accidentally forgotten causing failures for
applications that specify non default flags and non indefinite lifetime.

https://fedorahosted.org/gss-proxy/ticket/106

Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix resource leak in gpm_accept_sec_context().</title>
<updated>2013-10-15T11:48:20+00:00</updated>
<author>
<name>Günther Deschner</name>
<email>gdeschner@redhat.com</email>
</author>
<published>2013-10-14T15:30:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/commit/?id=39ea56ce5d2cdfe08ed137c5262a709bbb08f151'/>
<id>39ea56ce5d2cdfe08ed137c5262a709bbb08f151</id>
<content type='text'>
Resolves Coverity CID #12027.

Signed-off-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
Reviewed-by: Simo Sorce &lt;simo@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolves Coverity CID #12027.

Signed-off-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
Reviewed-by: Simo Sorce &lt;simo@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix socket error handling.</title>
<updated>2013-05-16T10:11:43+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2013-05-15T17:22:05+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/commit/?id=4d95d30532e2509a07285614b2f17a26dcb44725'/>
<id>4d95d30532e2509a07285614b2f17a26dcb44725</id>
<content type='text'>
1. Grab the socket lock for the whole conversation.

We need to keep the lock until the whole conversation is over.
Otherwise we may have concurrency issues where communication gets intermixed
and errors in one thread can cause a thread to hang.

Here is what we observed:

thread 1: grabs lock and send a request.
thread 2: grabs lock and sends a request
server: thread 2 request causes a fatal error and the server close the
connection
thread 2: grabs the lock and waits for a reply.
thread 2: gets the error and returns to caller with it (connection is closed).
thread 1: grabs the lock (which reopens the closed channel) and reads ...
... forever as the server has already killed all the previous state.

2. Fail immediately on short reads for the initial 4 byte length header.

If the first 4 bytes do not come at once don't bother retrying. In 99.9% of the
cases what we are witnessing here is a fatal error from the proxy that closed
the socket. Reopening the scket cannot accomplish anything as the request sent
down the channel is tied to the specific socket, so once the socket is closed
there is no hope to ever get back a reply.

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Grab the socket lock for the whole conversation.

We need to keep the lock until the whole conversation is over.
Otherwise we may have concurrency issues where communication gets intermixed
and errors in one thread can cause a thread to hang.

Here is what we observed:

thread 1: grabs lock and send a request.
thread 2: grabs lock and sends a request
server: thread 2 request causes a fatal error and the server close the
connection
thread 2: grabs the lock and waits for a reply.
thread 2: gets the error and returns to caller with it (connection is closed).
thread 1: grabs the lock (which reopens the closed channel) and reads ...
... forever as the server has already killed all the previous state.

2. Fail immediately on short reads for the initial 4 byte length header.

If the first 4 bytes do not come at once don't bother retrying. In 99.9% of the
cases what we are witnessing here is a fatal error from the proxy that closed
the socket. Reopening the scket cannot accomplish anything as the request sent
down the channel is tied to the specific socket, so once the socket is closed
there is no hope to ever get back a reply.

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for per-service sockets</title>
<updated>2013-04-23T19:02:50+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2013-04-12T21:09:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/commit/?id=edf939632c9a1dbab4e769f0c23fe393d7fc8a6a'/>
<id>edf939632c9a1dbab4e769f0c23fe393d7fc8a6a</id>
<content type='text'>
This way different processes running as the same user can be configured as
different servervices

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This way different processes running as the same user can be configured as
different servervices

Signed-off-by: Simo Sorce &lt;simo@redhat.com&gt;
Reviewed-by: Günther Deschner &lt;gdeschner@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
