Suppose we have code like this:
struct somedata {
int a;
int b;
};
struct somedata *data;
/* ... */
data = malloc(sizeof(struct somedata));
data->a = something;
Now, as you can see, NULL pointer check is missing. The question is - does this have security implications in case malloc fails? Let's assume the process exiting on SEGV by itself is not a problem in this case. Is there any other way this can be trouble from security standpoint? The application containing this code is not SUID or having any elevated privileges, but does process external input, so some parts of its memory can be user-controlled.
P.S. I am aware of CWE-476 but there the security implications are described in a very vague way ("In very rare circumstances and environments, code execution is possible" - which circumstances? which environments? How rare - meteor-hitting-you-in-the-head rare or once-a-year rare?) and I'd like to see some more specific info on what the threat is.