ALSA: ad1816a: Fix potential NULL pointer deref in snd_card_ad1816a_pnp()

JIRA: https://issues.redhat.com/browse/RHEL-101627

CVE: CVE-2025-38454

commit 043faef334a1f3d96ae88e1b7618bfa2b4946388
Author: Thorsten Blum <thorsten.blum@linux.dev>
Date: Thu Jul 3 22:06:13 2025 +0200

    ALSA: ad1816a: Fix potential NULL pointer deref in snd_card_ad1816a_pnp()

    Use pr_warn() instead of dev_warn() when 'pdev' is NULL to avoid a
    potential NULL pointer dereference.

    Cc: stable@vger.kernel.org
    Fixes: 20869176d7a7 ("ALSA: ad1816a: Use standard print API")
    Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
    Link: https://patch.msgid.link/20250703200616.304309-2-thorsten.blum@linux.dev
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
This commit is contained in:
Jaroslav Kysela 2025-07-30 18:15:02 +02:00
parent bce350012e
commit 2c9b100cd2
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ static int snd_card_ad1816a_pnp(int dev, struct pnp_card_link *card,
pdev = pnp_request_card_device(card, id->devs[1].id, NULL);
if (pdev == NULL) {
mpu_port[dev] = -1;
dev_warn(&pdev->dev, "MPU401 device busy, skipping.\n");
pr_warn("MPU401 device busy, skipping.\n");
return 0;
}