Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d921563 authored by Chetan C R's avatar Chetan C R Committed by Gerrit - the friendly Code Review server
Browse files

audit: Checks valid value of audit_signals and tsk->audit_context



There can be a case when current task's audit context
may be NULL or even if it is not NULL, it can have
invalid non-zero value of dummy variable and also
we should audit the signal only if we have non-zero
value of audit_signals.

Issue has been seen during power on/off tests.
So, better to add explicit check on these variables.

Change-Id: I2f3e17d933fca8e3b8f4013f44f942f11c68f440
Signed-off-by: default avatarChetan C R <cravin@codeaurora.org>
parent eddc683b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2252,9 +2252,10 @@ int __audit_signal_info(int sig, struct task_struct *t)
				audit_sig_uid = uid;
			security_task_getsecid(tsk, &audit_sig_sid);
		}
	}

	if (!audit_signals || audit_dummy_context())
		return 0;
	}

	/* optimize the common case by putting first signal recipient directly
	 * in audit_context */