!1179 fix: /dev/mem 及 /proc/fs_cache 权限漏洞修复挑单到3.2-Release分支

Merge pull request !1179 from yinjiaming/cherry-pick-1697592111
This commit is contained in:
openharmony_ci
2023-10-26 08:37:50 +00:00
committed by Gitee
2 changed files with 2 additions and 2 deletions

View File

@@ -97,5 +97,5 @@ static const struct file_operations_vfs g_memDevOps = {
int DevMemRegister(void)
{
return register_driver("/dev/mem", &g_memDevOps, 0666, 0); /* 0666: file mode */
return register_driver("/dev/mem", &g_memDevOps, 0644, 0); /* 0644: file mode */
}

View File

@@ -207,7 +207,7 @@ static const struct ProcFileOperations FS_CACHE_PROC_FOPS = {
void ProcFsCacheInit(void)
{
struct ProcDirEntry *pde = CreateProcEntry("fs_cache", 0, NULL);
struct ProcDirEntry *pde = CreateProcEntry("fs_cache", 0400, NULL);
if (pde == NULL) {
PRINT_ERR("create fs_cache error!\n");
return;