Bug 470958 (CVE-2008-5033) - CVE-2008-5033 kernel: security: avoid calling a NULL function pointer in drivers/video/tvaudio.c
Summary: CVE-2008-5033 kernel: security: avoid calling a NULL function pointer in driv...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2008-5033
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 470959 470960 470961 470962 470963 470964 470965
Blocks: 471880
TreeView+ depends on / blocked
 
Reported: 2008-11-11 04:15 UTC by Eugene Teo (Security Response)
Modified: 2021-11-12 19:53 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-19 06:47:03 UTC
Embargoed:


Attachments (Terms of Use)
Proposed upstream patch (1.24 KB, patch)
2008-11-11 04:28 UTC, Eugene Teo (Security Response)
no flags Details | Diff
Fix OOPS at chip_command call when handling VIDIOC_S_CTRL (5.28 KB, patch)
2008-11-14 17:15 UTC, Mauro Carvalho Chehab
no flags Details | Diff

Description Eugene Teo (Security Response) 2008-11-11 04:15:02 UTC
From: Arjan van de Ven <arjan.com>

NULL function pointers are very bad security wise. This one got caught by kerneloops.org quite a few times, so it's happening in the field....

Fix is simple, check the function pointer for NULL, like 6 other places in the same function are already doing.

Comment 4 Eugene Teo (Security Response) 2008-11-11 04:28:04 UTC
Created attachment 323147 [details]
Proposed upstream patch

Comment 11 Mauro Carvalho Chehab 2008-11-14 17:15:46 UTC
Created attachment 323605 [details]
Fix OOPS at chip_command call when handling VIDIOC_S_CTRL

This is the proper patch to fix the bug.

I've already commented about it upstream, at:

http://lkml.org/lkml/2008/11/14/169

I'll be sending also a pull request soon for the tvaudio patch series.

Comment 12 Mauro Carvalho Chehab 2008-11-14 18:15:48 UTC
Upstream request sent:

http://lkml.org/lkml/2008/11/14/202

I should be backporting the patches to RHEL kernels soon.

Comment 14 Eugene Teo (Security Response) 2008-11-17 04:05:59 UTC
(In reply to comment #11)
> Created an attachment (id=323605) [details]
> Fix OOPS at chip_command call when handling VIDIOC_S_CTRL
> 
> This is the proper patch to fix the bug.
> 
> I've already commented about it upstream, at:
> 
> http://lkml.org/lkml/2008/11/14/169
> 
> I'll be sending also a pull request soon for the tvaudio patch series.

Correct proposed upstream patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=01a1a3cc1e3fbe718bd06a2a5d4d1a2d0fb4d7d9

Comment 16 Eugene Teo (Security Response) 2008-11-17 06:13:52 UTC
(In reply to comment #14)
> (In reply to comment #11)
> > Created an attachment (id=323605) [details] [details]
> > Fix OOPS at chip_command call when handling VIDIOC_S_CTRL
> > 
> > This is the proper patch to fix the bug.
> > 
> > I've already commented about it upstream, at:
> > 
> > http://lkml.org/lkml/2008/11/14/169
> > 
> > I'll be sending also a pull request soon for the tvaudio patch series.
> 
> Correct proposed upstream patch:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=01a1a3cc1e3fbe718bd06a2a5d4d1a2d0fb4d7d9

"This bug were supposed to be fixed by 5ba2f67afb02c5302b2898949ed6fc3b3d37dcf1,
where a call to NULL happens.

Not all tvaudio chips allow controlling bass/treble. So, the driver
has a table with a flag to indicate if the chip does support it.

Unfortunately, the handling of this logic were broken for a very long
time (probably since the first module version). Due to that, an OOPS
were generated for devices that don't support bass/treble."

FYI.

Comment 17 Mauro Carvalho Chehab 2008-11-17 12:31:41 UTC
The bass/treble breakage were a regression, caused due to this changeset:
    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=dc3d75da05c3ff2dd6510c32a11deacced49d1a1

The changeset replaced the old V4L1 ioctls VIDIOCGAUDIO and VIDIOCSAUDIO into the V4L2 ones: VIDIOC_QUERYCTRL, VIDIOC_S_CTRL and VIDIOC_G_CTRL, unfortunately using an inverted logic when setting bass level.

So, it were basically replacing KABI for a more modern one.

Since changeset dc3d75da05c3ff2dd6510c32a11deacced49d1a1 weren't applied at RHEL kernels, they aren't vulnerable for CVE-2008-5033.

Comment 22 Eugene Teo (Security Response) 2008-11-19 06:47:03 UTC
This bug were due to KABI changes from V4L1 to V4L2 API. They don't affect
RHEL/MRG kernels.


Note You need to log in before you can comment on or make changes to this bug.