<feed xmlns='http://www.w3.org/2005/Atom'>
<title>system_core/gatekeeperd, branch replicant-10</title>
<subtitle>Fork of system/core
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/'/>
<entry>
<title>HACK: gatekeeperd: force software imeplementation</title>
<updated>2020-06-25T11:57:45+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2019-06-09T14:02:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=c92720b38d68913f61f1419c8bf910a09aba9e1d'/>
<id>c92720b38d68913f61f1419c8bf910a09aba9e1d</id>
<content type='text'>
Without that hack, IGatekeeper::getService() will try to get
a service implementing the Gatekeeper HAL. The HAL is supposed
to talk to a component that resides in a Trusted Execution
Environment (TEE) such as MobiCore.

On many Android device, the Trusted Execution Environment
is not free software, nor under the control of the user, so it
cannot be trusted by the user, and in fact it's better, if possible,
to make sure that it does not to run at all in that case.

Because of that the proper fix would be either to implement
a Gatekeeper HAL that would not depend on nonfree software that
cannot be trusted.

This could for instance be implemented by:
* Using a simple software implementation.
* Using the linux kernel keyring for that which can
  provide good resilience against userspace trying to get key
  material. See man 7 keyrings for more information on that.
* Have a free software Trusted Execution Environment like
  Google's Trusty or other implementations.

See the following documentation for more background information:
https://source.android.com/security/authentication/gatekeeper

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
Rebased and adapted for Replicant 10
Signed-off-by: Joonas Kylmälä &lt;joonas.kylmala@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without that hack, IGatekeeper::getService() will try to get
a service implementing the Gatekeeper HAL. The HAL is supposed
to talk to a component that resides in a Trusted Execution
Environment (TEE) such as MobiCore.

On many Android device, the Trusted Execution Environment
is not free software, nor under the control of the user, so it
cannot be trusted by the user, and in fact it's better, if possible,
to make sure that it does not to run at all in that case.

Because of that the proper fix would be either to implement
a Gatekeeper HAL that would not depend on nonfree software that
cannot be trusted.

This could for instance be implemented by:
* Using a simple software implementation.
* Using the linux kernel keyring for that which can
  provide good resilience against userspace trying to get key
  material. See man 7 keyrings for more information on that.
* Have a free software Trusted Execution Environment like
  Google's Trusty or other implementations.

See the following documentation for more background information:
https://source.android.com/security/authentication/gatekeeper

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
Rebased and adapted for Replicant 10
Signed-off-by: Joonas Kylmälä &lt;joonas.kylmala@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b am: b25983460c am: 20e73e23c4 am: ca662c7118</title>
<updated>2019-06-21T20:52:15+00:00</updated>
<author>
<name>Janis Danisevskis</name>
<email>jdanis@google.com</email>
</author>
<published>2019-06-21T20:52:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=4ea7584d34ebf9d5892e57f5df7deb56a7312961'/>
<id>4ea7584d34ebf9d5892e57f5df7deb56a7312961</id>
<content type='text'>
am: 14d1d6add8

Change-Id: I6dfe27acaeba2ce4bc55169dcdccd14a7b9ee358
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
am: 14d1d6add8

Change-Id: I6dfe27acaeba2ce4bc55169dcdccd14a7b9ee358
</pre>
</div>
</content>
</entry>
<entry>
<title>[automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b am: b25983460c am: 20e73e23c4</title>
<updated>2019-06-21T20:48:16+00:00</updated>
<author>
<name>Janis Danisevskis</name>
<email>jdanis@google.com</email>
</author>
<published>2019-06-21T20:48:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=14d1d6add83f19c63d9a9e9ec9f6d8938b44f80d'/>
<id>14d1d6add83f19c63d9a9e9ec9f6d8938b44f80d</id>
<content type='text'>
am: ca662c7118

Change-Id: I07e889d6ed94901f2bf70f90c995873cc58d3bf4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
am: ca662c7118

Change-Id: I07e889d6ed94901f2bf70f90c995873cc58d3bf4
</pre>
</div>
</content>
</entry>
<entry>
<title>[automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b am: b25983460c</title>
<updated>2019-06-21T20:38:10+00:00</updated>
<author>
<name>Janis Danisevskis</name>
<email>jdanis@google.com</email>
</author>
<published>2019-06-21T20:38:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=ca662c71185e94bfe43a3a0c73cd78f6113fc98e'/>
<id>ca662c71185e94bfe43a3a0c73cd78f6113fc98e</id>
<content type='text'>
am: 20e73e23c4

Change-Id: I026aa5ddb79cd10146924fd6625816782645f660
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
am: 20e73e23c4

Change-Id: I026aa5ddb79cd10146924fd6625816782645f660
</pre>
</div>
</content>
</entry>
<entry>
<title>[automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b</title>
<updated>2019-06-21T20:33:05+00:00</updated>
<author>
<name>Janis Danisevskis</name>
<email>jdanis@google.com</email>
</author>
<published>2019-06-21T20:33:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=20e73e23c4e58cfaf71348110bbecf470c02e1a7'/>
<id>20e73e23c4e58cfaf71348110bbecf470c02e1a7</id>
<content type='text'>
am: b25983460c

Change-Id: Ie7a02bb3c7b283f3497a469e0cd3b2b69792d2f6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
am: b25983460c

Change-Id: Ie7a02bb3c7b283f3497a469e0cd3b2b69792d2f6
</pre>
</div>
</content>
</entry>
<entry>
<title>[automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02 am: 4ae4ad8e5b</title>
<updated>2019-06-20T22:31:20+00:00</updated>
<author>
<name>Android Build Merger (Role)</name>
<email>noreply-android-build-merger@google.com</email>
</author>
<published>2019-06-20T22:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=b25983460c6df5fa467beebc972da76fd51db6ef'/>
<id>b25983460c6df5fa467beebc972da76fd51db6ef</id>
<content type='text'>
Change-Id: I3fb4fc631eccd68a8f4468363d841855f94187f9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I3fb4fc631eccd68a8f4468363d841855f94187f9
</pre>
</div>
</content>
</entry>
<entry>
<title>[automerger] Fix a memory leak in gatekeeper. am: 6a9c4e7968 am: bdc924f31d am: 7535975701 am: e126026c02</title>
<updated>2019-06-20T22:31:18+00:00</updated>
<author>
<name>Android Build Merger (Role)</name>
<email>noreply-android-build-merger@google.com</email>
</author>
<published>2019-06-20T22:31:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=4ae4ad8e5b15451b346cb4f7df6af3afc89b9805'/>
<id>4ae4ad8e5b15451b346cb4f7df6af3afc89b9805</id>
<content type='text'>
Change-Id: I98df60cfed36c714dae1fa4218d3c5ef23c4035c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I98df60cfed36c714dae1fa4218d3c5ef23c4035c
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a memory leak in gatekeeper.</title>
<updated>2019-06-20T22:31:06+00:00</updated>
<author>
<name>Janis Danisevskis</name>
<email>jdanis@google.com</email>
</author>
<published>2019-06-05T23:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=6a9c4e7968e73393110b169b33fb636531fe7fc2'/>
<id>6a9c4e7968e73393110b169b33fb636531fe7fc2</id>
<content type='text'>
In violation to the documentation of GateKeeper::GetAuthTokenKey and
GateKeeper::GetPasswordKey, the implementations in SoftGateKeeper
allocate and return buffers and relinquish ownership causing a memory
leak, because the caller expects the implementation to retain ownership.

Bug: 129768470
Bug: 134557251
Test: gatekeeper-unit-tests
Change-Id: I0af9539d3dcd47dfd1e7d80cdee700ea0c2d6d0f
Merged-In: I0af9539d3dcd47dfd1e7d80cdee700ea0c2d6d0f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In violation to the documentation of GateKeeper::GetAuthTokenKey and
GateKeeper::GetPasswordKey, the implementations in SoftGateKeeper
allocate and return buffers and relinquish ownership causing a memory
leak, because the caller expects the implementation to retain ownership.

Bug: 129768470
Bug: 134557251
Test: gatekeeper-unit-tests
Change-Id: I0af9539d3dcd47dfd1e7d80cdee700ea0c2d6d0f
Merged-In: I0af9539d3dcd47dfd1e7d80cdee700ea0c2d6d0f
</pre>
</div>
</content>
</entry>
<entry>
<title>gatekeeperd: fixed potential nullptr deref</title>
<updated>2019-03-14T20:51:50+00:00</updated>
<author>
<name>Janis Danisevskis</name>
<email>jdanis@google.com</email>
</author>
<published>2019-03-14T20:48:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=e8d2835d8ddb980eb8fd52e36bc8507f802fccba'/>
<id>e8d2835d8ddb980eb8fd52e36bc8507f802fccba</id>
<content type='text'>
gatekeeperd verifyChallenge may use several pointer parameters
unchecked.

Also fixed broken length parameter check.

Bug: 127909982
Test: Not yet
Change-Id: I708bdc8afcb30f252385e51c4aa4bcefe1ef1045
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gatekeeperd verifyChallenge may use several pointer parameters
unchecked.

Also fixed broken length parameter check.

Bug: 127909982
Test: Not yet
Change-Id: I708bdc8afcb30f252385e51c4aa4bcefe1ef1045
</pre>
</div>
</content>
</entry>
<entry>
<title>Use distinct GateKeeper userids when running a GSI.</title>
<updated>2019-02-28T16:56:30+00:00</updated>
<author>
<name>David Anderson</name>
<email>dvander@google.com</email>
</author>
<published>2019-02-15T23:59:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=97400bd86535f2b4ce337c0b160c799c1afeca57'/>
<id>97400bd86535f2b4ce337c0b160c799c1afeca57</id>
<content type='text'>
GateKeeper uses userids to key authentication data. This poses a problem
for GSIs, since both the GSI and the host image will be storing separate
authentication data for the same userids.

To account for this, we add a large offset (1000000) to GSI userids
before handing them off to the GateKeeper HAL. Note that
SyntheticPasswordManager uses a similar trick to store Weaver data in
GateKeeper (when a Weaver HAL is not available).

Bug: 123716647
Test: PIN authentication works after booting into a GSI
Change-Id: I714368919f8e46ff1931f350342f09fa09225a35
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GateKeeper uses userids to key authentication data. This poses a problem
for GSIs, since both the GSI and the host image will be storing separate
authentication data for the same userids.

To account for this, we add a large offset (1000000) to GSI userids
before handing them off to the GateKeeper HAL. Note that
SyntheticPasswordManager uses a similar trick to store Weaver data in
GateKeeper (when a Weaver HAL is not available).

Bug: 123716647
Test: PIN authentication works after booting into a GSI
Change-Id: I714368919f8e46ff1931f350342f09fa09225a35
</pre>
</div>
</content>
</entry>
</feed>
