projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/edid/firmware: Add built-in edid/1280x720.bin firmware
[platform/kernel/linux-starfive.git]
/
security
/
apparmor
/
policy_unpack.c
diff --git
a/security/apparmor/policy_unpack.c
b/security/apparmor/policy_unpack.c
index
55d31ba
..
9c3fec2
100644
(file)
--- a/
security/apparmor/policy_unpack.c
+++ b/
security/apparmor/policy_unpack.c
@@
-917,8
+917,13
@@
static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
goto fail;
}
goto fail;
}
- rhashtable_insert_fast(profile->data, &data->head,
- profile->data->p);
+ if (rhashtable_insert_fast(profile->data, &data->head,
+ profile->data->p)) {
+ kfree_sensitive(data->key);
+ kfree_sensitive(data);
+ info = "failed to insert data to table";
+ goto fail;
+ }
}
if (!unpack_nameX(e, AA_STRUCTEND, NULL)) {
}
if (!unpack_nameX(e, AA_STRUCTEND, NULL)) {
@@
-972,7
+977,7
@@
static int verify_header(struct aa_ext *e, int required, const char **ns)
* if not specified use previous version
* Mask off everything that is not kernel abi version
*/
* if not specified use previous version
* Mask off everything that is not kernel abi version
*/
- if (VERSION_LT(e->version, v5) || VERSION_GT(e->version, v
7
)) {
+ if (VERSION_LT(e->version, v5) || VERSION_GT(e->version, v
8
)) {
audit_iface(NULL, NULL, NULL, "unsupported interface version",
e, error);
return error;
audit_iface(NULL, NULL, NULL, "unsupported interface version",
e, error);
return error;