In the Linux kernel, the following vulnerability has been resolved: apparmor: Fix double free of nsname in aareplaceprofiles() if nsname is NULL after 1071 error = aaunpack(udata, &lh, &nsname); and if ent->nsname contains an nsname in 1089 } else if (ent->nsname) { then nsname is assigned the ent->nsname 1095 nsname = ent->nsname; however ent->nsname is freed at 1262 aaloadentfree(ent); and then again when freeing nsname at 1270 kfree(nsname); Fix this by NULLing out ent->nsname after it is transferred to ns_name ")