libceph: make free_choose_arg_map() resilient to partial allocation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5cf9c4a9959b6273675310d14a834ef14fbca37c · < f21c3fdb96833aac2f533506899fe38c19cf49d5| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
libceph: make free_choose_arg_map() resilient to partial allocation
free_choose_arg_map() may dereference a NULL pointer if its caller fails after a partial allocation.
For example, in decode_choose_args(), if allocation of arg_map->args fails, execution jumps to the fail label and free_choose_arg_map() is called. Since arg_map->size is updated to a non-zero value before memory allocation, free_choose_arg_map() will iterate over arg_map->args and dereference a NULL pointer.
To prevent this potential NULL pointer dereference and make free_choose_arg_map() more resilient, add checks for pointers before iterating.
From the CVE record · Linux
The Linux kernel's libceph free_choose_arg_map() may dereference a NULL pointer when its caller fails after a partial allocation. The input does not specify whether an attacker can trigger this condition, or any network, authentication, or user-interaction requirements.
Engineers running the Linux kernel should check their versions; affected versions are not specified.