Bug 2169474

Summary: kernel: multiple issues in drivers/media/platform/chips-media/coda where lacks check of the return value of kmalloc() can cause the NULL Pointer Dereference
Product: [Other] Security Response Reporter: Alex <allarkin>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: acaringi, bhu, chwhite, crwood, ddepaula, debarbos, dfreiber, dhoward, drow, dvlasenk, ezulian, fhrbata, hkrzesin, jarod, jburrell, jfaracco, jferlan, jforbes, jlelli, joe.lawrence, jshortt, jstancek, jwyatt, kcarcia, kernel-mgr, lgoncalv, lleshchi, lzampier, nmurray, ptalbert, qzhao, rogbas, rvrbovsk, scweaver, tyberry, vkumar, walters, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Linux kernel 6.1-rc8 Doc Type: If docs needed, set a value
Doc Text:
A null pointer dereference in the Linux kernel Code video codec driver was found. A local user could use this flaw to crash the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-15 04:41:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2169475    
Bug Blocks: 2167953    

Description Alex 2023-02-13 17:13:18 UTC
An issue was discovered in the Linux kernel through 6.1-rc8.
coda9_jpeg_start_encoding in drivers/media/platform/chips-media/coda-jpeg.c
lacks check of the return value of kmalloc() and will
cause the NULL Pointer Dereference.

Reference:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f30ce3d3760b22ee33c8d9c2e223764ad30bdc5f

Comment 1 Alex 2023-02-13 17:13:43 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2169475]

Comment 3 Alex 2023-02-13 17:16:47 UTC
There is one more very similar issue:

coda_start_encoding in drivers/media/platform/chips-media/coda-bit.c
lacks check of the return value of kmalloc() and will cause the
NULL Pointer Dereference.

Reference:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6e5e5defdb8b0186312c2f855ace175aee6daf9b

Comment 5 Alex 2023-02-13 17:18:46 UTC
There is one more issue for same part of source code:

coda_setup_iram in drivers/media/platform/chips-media/coda-bit.c
lacks check of the return value of coda_iram_alloc() and will cause the
NULL Pointer Dereference.

Reference:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6b8082238fb8bb20f67e46388123e67a5bbc558d

Comment 7 Justin M. Forbes 2023-03-01 19:30:30 UTC
This was fixed for Fedora with the 6.0.16 stable kernel updates.