block: zero kernel addresses on ioctl

This commit is contained in:
Matheus
2023-09-09 13:29:36 -03:00
parent 15a26b5af5
commit e07ebc52b9
+3
View File
@@ -141,6 +141,9 @@ static int ioctl(int minor, unsigned long request, void *arg, int *result) {
switch (request) { switch (request) {
case BLOCK_IOCTL_GETDESC: case BLOCK_IOCTL_GETDESC:
*(blockdesc_t *)arg = *desc; *(blockdesc_t *)arg = *desc;
((blockdesc_t *)arg)->write = NULL;
((blockdesc_t *)arg)->read = NULL;
((blockdesc_t *)arg)->private = NULL;
break; break;
default: default:
ret = ENOTTY; ret = ENOTTY;