X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/15129b1c8dbb3650c63b70adb1cad9af601c6c17..22ba694c5857e62b5a553b1505dcf2e509177f28:/tools/tests/xnu_quick_test/shared_memory_tests.c diff --git a/tools/tests/xnu_quick_test/shared_memory_tests.c b/tools/tests/xnu_quick_test/shared_memory_tests.c index 9467e4d22..e22ce034e 100644 --- a/tools/tests/xnu_quick_test/shared_memory_tests.c +++ b/tools/tests/xnu_quick_test/shared_memory_tests.c @@ -57,6 +57,16 @@ int shm_tests( void * the_argp ) goto test_failed_exit; } + if (my_shmid_ds.shm_internal != (void *) 0){ + /* + * The shm_internal field is a pointer reserved for kernel + * use only. It should not be leaked to user space. + * (PR-15642873) + */ + printf( "shmctl failed to sanitize kernel internal pointer \n" ); + goto test_failed_exit; + } + my_err = shmdt( my_shm_addr ); if ( my_err == -1 ) { printf( "shmdt failed with error %d - \"%s\" \n", errno, strerror( errno) );