This rule is Obsolete | |
Synopsis: | A user-land pointer is dereferenced without safety checks in the kernel |
Language: | C++ |
Severity Level: | 3 |
Category: | Security |
Description: |
Be aware of cases where an operating
system kernel unsafely dereferences user pointers. Operating systems cannot directly
dereference user-space pointers safely. Instead, they must access the pointed-to data
using special "paranoid" routines (for example: using the The following example has a defect because
void user_pointer_example() { error = copyin((void *)p->p_sysent->sv_psstrings, &pstr, sizeof(pstr)); if (error) return (error); for (i = 0; i < pstr.ps_nargvstr; i++) { sbuf_copyin(sb, pstr.ps_argvstr[i], 0); sbuf_printf(sb, "%c", '\0'); } } |