Mark Salyzyn
d5b3108d95
ANDROID: regression introduced override_creds=off
...
Solve a regression introduced by
commit 272fcd1ca7
("ANDROID: overlayfs: override_creds=off option bypass creator_cred")
where a crash is observed a crash in ovl_create_or_link() when a
simple re-direction command in vendor directory.
/vendor/bin/<Any test> > /vendor/bin/test_log.txt 2>&1&
After further debugging we see that if the output is redirected to a
file which doesn’t exist we see this stack:
[ 377.382745] ovl_create_or_link+0xac/0x710
[ 377.382745] ovl_create_object+0xb8/0x110
[ 377.382745] ovl_create+0x34/0x40
[ 377.382745] path_openat+0xd44/0x15a8
[ 377.382745] do_filp_open+0x80/0x128
[ 377.382745] do_sys_open+0x140/0x250
[ 377.382745] __arm64_sys_openat+0x2c/0x38
ovl_override_creds returns NULL because the override_cred flag is set
to false. This causes ovl_revert_creds also to fail.
There is another call to check override_cred in override_cred call
which overrides the creds permanently as there no revert_creds
associated. So whenever next commit_cred is called we see the crash
as the credentials are permanently overridden.
Signed-off-by: Mark Salyzyn <salyzyn@google.com >
Tested-by: Rishabh/Jeevan <jshriram@qualcomm.corp-partner.google.com >
Bug: 140816499
Change-Id: Icd0d9be82fc57af5ead1eeab99f79adf3adf62ef
2019-11-06 15:30:32 +00:00
..
2019-10-11 18:21:13 +02:00
2019-08-06 19:06:49 +02:00
2018-05-28 12:36:41 +02:00
2019-09-10 10:33:52 +01:00
2019-03-13 14:02:32 -07:00
2018-06-15 18:10:01 -03:00
2018-12-01 09:37:27 +01:00
2019-11-06 13:05:22 +01:00
2018-12-17 09:24:40 +01:00
2019-10-11 18:21:15 +02:00
2019-11-06 13:05:51 +01:00
2019-08-06 19:06:51 +02:00
2019-06-22 08:15:17 +02:00
2018-11-13 11:08:55 -08:00
2019-10-23 11:12:33 -07:00
2019-05-08 07:21:48 +02:00
2019-03-23 20:09:59 +01:00
2019-07-31 07:27:07 +02:00
2019-07-26 09:14:29 +02:00
2018-07-22 14:13:44 +02:00
2018-11-27 16:13:00 +01:00
2018-12-17 09:24:35 +01:00
2019-03-23 20:10:03 +01:00
2019-11-06 13:21:58 +01:00
2019-11-06 13:05:17 +01:00
2019-10-07 18:57:14 +02:00
2018-05-22 14:27:51 -04:00
2018-12-17 09:24:40 +01:00
2019-11-06 13:06:13 +01:00
2019-10-05 13:10:07 +02:00
2018-12-17 09:24:41 +01:00
2018-12-17 09:24:41 +01:00
2018-08-17 16:20:28 -07:00
2018-08-25 12:42:33 -07:00
2019-05-22 08:00:39 +02:00
2018-08-21 11:37:41 +02:00
2019-07-28 08:29:29 +02:00
2019-05-20 17:46:45 -07:00
2018-08-15 22:47:23 -07:00
2019-05-16 19:52:46 +02:00
2019-06-09 09:17:22 +02:00
2018-05-22 14:27:52 -04:00
2019-11-06 13:21:58 +01:00
2018-03-27 13:18:09 -04:00
2019-07-10 09:53:47 +02:00
2018-09-04 16:45:02 -07:00
2019-08-12 13:36:37 -04:00
2018-08-17 16:20:27 -07:00
2019-11-06 13:05:58 +01:00
2018-05-22 14:27:58 -04:00
2018-05-22 14:27:57 -04:00
2018-08-14 12:07:14 -04:00
2019-11-06 15:30:32 +00:00
2019-10-29 09:41:48 +01:00
2019-10-07 18:56:59 +02:00
2018-05-22 14:27:52 -04:00
2018-05-22 14:27:54 -04:00
2019-07-14 08:11:15 +02:00
2018-11-27 16:12:59 +01:00
2018-05-22 14:27:55 -04:00
2019-10-23 11:12:33 -07:00
2018-08-02 09:34:02 -07:00
2018-08-18 11:44:53 -07:00
2018-12-17 09:24:30 +01:00
2018-07-31 11:32:44 -04:00
2019-10-07 13:29:05 -07:00
2019-07-14 08:11:16 +02:00
2019-05-25 18:23:46 +02:00
2019-09-23 13:23:30 -07:00
2019-09-23 14:11:56 -07:00
2019-10-01 08:26:12 +02:00
2019-05-02 09:58:59 +02:00
2018-07-12 10:04:27 -04:00
2018-12-05 09:48:14 -08:00
2018-07-12 10:04:20 -04:00
2018-04-11 10:28:37 -07:00
2018-06-12 16:19:22 -07:00
2019-10-05 13:10:06 +02:00
2019-07-03 13:14:44 +02:00
2018-07-10 23:29:03 -04:00
2019-11-06 13:05:37 +01:00
2019-04-17 08:38:52 +02:00
2019-04-05 22:33:00 +02:00
2019-05-31 06:46:27 -07:00
2019-08-09 17:52:34 +02:00
2018-06-05 19:23:26 +02:00
2018-12-05 09:48:13 -08:00
2018-03-29 15:07:46 -04:00
2019-08-16 10:12:52 +02:00
2019-07-31 21:34:30 -07:00
2018-04-02 20:15:39 +02:00
2019-03-05 17:58:50 +01:00
2019-03-13 14:02:32 -07:00
2018-06-28 10:40:47 -07:00
2019-10-11 14:04:42 -07:00
2019-08-04 09:37:11 +02:00
2018-08-15 23:03:20 -05:00
2018-08-21 18:19:09 -07:00
2019-04-05 22:32:59 +02:00
2018-05-16 07:23:35 +02:00
2019-10-01 09:41:17 +02:00
2019-07-26 09:14:08 +02:00
2019-07-31 21:34:30 -07:00
2019-05-31 08:14:29 -07:00
2018-11-21 09:19:14 +01:00
2019-03-13 14:02:29 -07:00
2019-10-07 13:29:05 -07:00
2018-08-02 08:06:55 +09:00
2019-10-17 13:45:35 -07:00
2018-08-21 18:19:09 -07:00
2019-10-07 13:29:05 -07:00
2018-06-12 16:19:22 -07:00
2019-08-17 00:18:14 +00:00
2019-08-27 21:50:14 +00:00
2019-10-07 15:27:40 -04:00
2019-05-25 18:23:26 +02:00
2019-07-31 08:03:42 +02:00
2019-05-04 09:20:11 +02:00
2019-01-19 01:25:07 +00:00
2018-12-05 09:48:13 -08:00
2018-12-05 09:48:13 -08:00
2019-10-01 09:41:17 +02:00
2018-04-02 20:16:02 +02:00
2018-06-28 10:40:47 -07:00
2019-08-25 10:47:43 +02:00
2018-06-16 16:21:50 +09:00
2019-05-04 09:20:11 +02:00
2018-04-02 20:15:34 +02:00
2019-10-11 18:21:39 +02:00
2019-10-07 13:29:05 -07:00
2018-12-05 09:48:12 -08:00
2018-08-13 20:56:23 -07:00
2019-10-07 15:27:41 -04:00
2018-12-05 09:48:13 -08:00
2019-11-06 15:27:46 +00:00