In the Linux kernel, the following vulnerability has been resolved:
greybus: lights: check return of getchannelfrom_mode
If channel for the given node is not found we return null from getchannelfrom_mode. Make sure we validate the return pointer before using it in two of the missing places.
This was originally reported in [0]: Found by Linux Verification Center (linuxtesting.org) with SVACE.
[0] https://lore.kernel.org/all/20240301190425.120605-1-m.lobanov@rosalinux.ru
[ { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eac10cf3a97ffd4b4deb0a29f57c118225a42850", "signature_version": "v1", "target": { "function": "gb_lights_light_v4l2_register", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "232897503497203728914221915234227178457", "length": 1404.0 }, "id": "CVE-2024-38637-0834e4eb" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1ba19a1ae7cd1e324685ded4ab563e78fe68648", "signature_version": "v1", "target": { "file": "drivers/staging/greybus/light.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "289111440476768029141303061317464509250", "322951103829543592406276934842327945521", "52194355687885053771748314041710677108", "112346980638097635056272167384875752738", "180830355120258936543650805256670207976", "633976646266854118670916706967274735", "165812762704552641866001929834377349359" ] }, "id": "CVE-2024-38637-0c367659" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e2c64246e5dc8c0d35ec41770b85e2b4cafdff21", "signature_version": "v1", "target": { "file": "drivers/staging/greybus/light.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "289111440476768029141303061317464509250", "322951103829543592406276934842327945521", "52194355687885053771748314041710677108", "112346980638097635056272167384875752738", "180830355120258936543650805256670207976", "633976646266854118670916706967274735", "165812762704552641866001929834377349359" ] }, "id": "CVE-2024-38637-204aeb81" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9b41a9b9c8be8c552f10633453fdb509e83b66f8", "signature_version": "v1", "target": { "function": "__gb_lights_flash_brightness_set", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "178483690838840399389435631694421011960", "length": 296.0 }, "id": "CVE-2024-38637-3e6d67e6" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eac10cf3a97ffd4b4deb0a29f57c118225a42850", "signature_version": "v1", "target": { "function": "__gb_lights_flash_brightness_set", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "178483690838840399389435631694421011960", "length": 296.0 }, "id": "CVE-2024-38637-61217007" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@330f6bcdcef03f70f81db5f2ed6747af656a09f2", "signature_version": "v1", "target": { "file": "drivers/staging/greybus/light.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "289111440476768029141303061317464509250", "322951103829543592406276934842327945521", "52194355687885053771748314041710677108", "112346980638097635056272167384875752738", "180830355120258936543650805256670207976", "633976646266854118670916706967274735", "165812762704552641866001929834377349359" ] }, "id": "CVE-2024-38637-6aca797e" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eac10cf3a97ffd4b4deb0a29f57c118225a42850", "signature_version": "v1", "target": { "file": "drivers/staging/greybus/light.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "289111440476768029141303061317464509250", "322951103829543592406276934842327945521", "52194355687885053771748314041710677108", "112346980638097635056272167384875752738", "180830355120258936543650805256670207976", "633976646266854118670916706967274735", "165812762704552641866001929834377349359" ] }, "id": "CVE-2024-38637-6e394e7e" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1ba19a1ae7cd1e324685ded4ab563e78fe68648", "signature_version": "v1", "target": { "function": "__gb_lights_flash_brightness_set", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "178483690838840399389435631694421011960", "length": 296.0 }, "id": "CVE-2024-38637-6e5dd8b3" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@895cdd9aa9546523df839f9cc1488a0ecc1e0731", "signature_version": "v1", "target": { "function": "__gb_lights_flash_brightness_set", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "178483690838840399389435631694421011960", "length": 296.0 }, "id": "CVE-2024-38637-6f0e6c90" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@330f6bcdcef03f70f81db5f2ed6747af656a09f2", "signature_version": "v1", "target": { "function": "gb_lights_light_v4l2_register", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "232897503497203728914221915234227178457", "length": 1404.0 }, "id": "CVE-2024-38637-6f2d9fba" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9b41a9b9c8be8c552f10633453fdb509e83b66f8", "signature_version": "v1", "target": { "function": "gb_lights_light_v4l2_register", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "232897503497203728914221915234227178457", "length": 1404.0 }, "id": "CVE-2024-38637-78f64b64" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@330f6bcdcef03f70f81db5f2ed6747af656a09f2", "signature_version": "v1", "target": { "function": "__gb_lights_flash_brightness_set", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "178483690838840399389435631694421011960", "length": 296.0 }, "id": "CVE-2024-38637-83a98ea9" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8f4a76d477f0cc3c54d512f07f6f88c8e1c1e07b", "signature_version": "v1", "target": { "function": "gb_lights_light_v4l2_register", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "232897503497203728914221915234227178457", "length": 1404.0 }, "id": "CVE-2024-38637-8bbb5ade" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8f4a76d477f0cc3c54d512f07f6f88c8e1c1e07b", "signature_version": "v1", "target": { "file": "drivers/staging/greybus/light.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "289111440476768029141303061317464509250", "322951103829543592406276934842327945521", "52194355687885053771748314041710677108", "112346980638097635056272167384875752738", "180830355120258936543650805256670207976", "633976646266854118670916706967274735", "165812762704552641866001929834377349359" ] }, "id": "CVE-2024-38637-92a43c70" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@518e2c46b5dbce40b1aa0100001d03c3ceaa7d38", "signature_version": "v1", "target": { "file": "drivers/staging/greybus/light.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "289111440476768029141303061317464509250", "322951103829543592406276934842327945521", "52194355687885053771748314041710677108", "112346980638097635056272167384875752738", "180830355120258936543650805256670207976", "633976646266854118670916706967274735", "165812762704552641866001929834377349359" ] }, "id": "CVE-2024-38637-95adc403" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e2c64246e5dc8c0d35ec41770b85e2b4cafdff21", "signature_version": "v1", "target": { "function": "__gb_lights_flash_brightness_set", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "178483690838840399389435631694421011960", "length": 296.0 }, "id": "CVE-2024-38637-b6640b08" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1ba19a1ae7cd1e324685ded4ab563e78fe68648", "signature_version": "v1", "target": { "function": "gb_lights_light_v4l2_register", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "232897503497203728914221915234227178457", "length": 1404.0 }, "id": "CVE-2024-38637-b9f6b2f6" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@518e2c46b5dbce40b1aa0100001d03c3ceaa7d38", "signature_version": "v1", "target": { "function": "__gb_lights_flash_brightness_set", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "178483690838840399389435631694421011960", "length": 296.0 }, "id": "CVE-2024-38637-bd07db34" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@895cdd9aa9546523df839f9cc1488a0ecc1e0731", "signature_version": "v1", "target": { "file": "drivers/staging/greybus/light.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "289111440476768029141303061317464509250", "322951103829543592406276934842327945521", "52194355687885053771748314041710677108", "112346980638097635056272167384875752738", "180830355120258936543650805256670207976", "633976646266854118670916706967274735", "165812762704552641866001929834377349359" ] }, "id": "CVE-2024-38637-c3372bf2" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@895cdd9aa9546523df839f9cc1488a0ecc1e0731", "signature_version": "v1", "target": { "function": "gb_lights_light_v4l2_register", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "232897503497203728914221915234227178457", "length": 1404.0 }, "id": "CVE-2024-38637-d271b845" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8f4a76d477f0cc3c54d512f07f6f88c8e1c1e07b", "signature_version": "v1", "target": { "function": "__gb_lights_flash_brightness_set", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "178483690838840399389435631694421011960", "length": 296.0 }, "id": "CVE-2024-38637-e4124f17" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9b41a9b9c8be8c552f10633453fdb509e83b66f8", "signature_version": "v1", "target": { "file": "drivers/staging/greybus/light.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "289111440476768029141303061317464509250", "322951103829543592406276934842327945521", "52194355687885053771748314041710677108", "112346980638097635056272167384875752738", "180830355120258936543650805256670207976", "633976646266854118670916706967274735", "165812762704552641866001929834377349359" ] }, "id": "CVE-2024-38637-e90cb4ea" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@518e2c46b5dbce40b1aa0100001d03c3ceaa7d38", "signature_version": "v1", "target": { "function": "gb_lights_light_v4l2_register", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "232897503497203728914221915234227178457", "length": 1404.0 }, "id": "CVE-2024-38637-fd2c2087" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e2c64246e5dc8c0d35ec41770b85e2b4cafdff21", "signature_version": "v1", "target": { "function": "gb_lights_light_v4l2_register", "file": "drivers/staging/greybus/light.c" }, "digest": { "function_hash": "232897503497203728914221915234227178457", "length": 1404.0 }, "id": "CVE-2024-38637-fdecb4c9" } ]