Markus Elfring
2024-Jun-27 09:02 UTC
[PATCH v3] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
> In nouveau_connector_get_modes(), the return value of drm_mode_duplicate() > is assigned to mode, which will lead to a possible NULL pointer > dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.A) Can a wording approach (like the following) be a better change description? A null pointer is stored in the local variable ?mode? after a call of the function ?drm_mode_duplicate? failed. This pointer was passed to a subsequent call of the function ?drm_mode_probed_add? where an undesirable dereference will be performed then. Thus add a corresponding return value check. B) How do you think about to append parentheses to the function name in the summary phrase? C) How do you think about to put similar results from static source code analyses into corresponding patch series? Regards, Markus
Lyude Paul
2024-Jun-28 17:49 UTC
[PATCH v3] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
Ma Ke - I assume you already know but you can just ignore this message from Markus as it is just spam. Sorry about the trouble! Markus, you've already been asked by Greg so I will ask a bit more sternly in case there is actually a person on the other end: you've already been asked to stop by Greg and are being ignored by multiple kernel maintainers. If I keep seeing messages like this from you I will assume you are a bot and I will block your email from both DRI related mailing lists (nouveau and dri-devel) accordingly. You've done this 3 times now. (...I doubt I'll get a response from Markus, but I certainly want to make sure they are a bot and not an actual person before removing them :) On Thu, 2024-06-27 at 11:02 +0200, Markus Elfring wrote:> > In nouveau_connector_get_modes(), the return value of > > drm_mode_duplicate() > > is assigned to mode, which will lead to a possible NULL pointer > > dereference on failure of drm_mode_duplicate(). Add a check to > > avoid npd. > > A) Can a wording approach (like the following) be a better change > description? > > ?? A null pointer is stored in the local variable ?mode? after a call > ?? of the function ?drm_mode_duplicate? failed. This pointer was > passed to > ?? a subsequent call of the function ?drm_mode_probed_add? where an > undesirable > ?? dereference will be performed then. > ?? Thus add a corresponding return value check. > > > B) How do you think about to append parentheses to the function name > ?? in the summary phrase? > > > C) How do you think about to put similar results from static source > code > ?? analyses into corresponding patch series? > > > Regards, > Markus >-- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat
Reasonably Related Threads
- [PATCH v3] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
- [PATCH] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
- [PATCH] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
- [PATCH v2] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
- [PATCH] drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_ld_modes