public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Németh Márton" <nm127@freemail.hu>
To: Laurent Pinchart <laurent.pinchart@skynet.be>
Cc: Trent Piepho <xyzzy@speakeasy.org>, linux-media@vger.kernel.org
Subject: Re: [RFC,PATCH] VIDIOC_G_EXT_CTRLS does not handle NULL pointer correctly
Date: Thu, 28 May 2009 08:44:30 +0200	[thread overview]
Message-ID: <4A1E32CE.9090203@freemail.hu> (raw)
In-Reply-To: <200905271727.01409.laurent.pinchart@skynet.be>

Laurent Pinchart worte:
> Could a very large number of control requests be used as a DoS attack vector ? 
> A userspace application could kmalloc large amounts of memory without any 
> restriction. Memory would be reclaimed eventually, but after performing a 
> large number of USB requests, which could take quite a long time.

A DoS attacker could open the /dev/video0 several times even from one single
process (from different threads) and could kmalloc() as much memory as the
attacker wants. Maybe even one file descriptor would be enough using it from
different threads. This could force the system to swap out pages to get the
necessary memory.

I don't know if more than one instance of the VIDIOC_G_EXT_CTRLS requests can
actively keep memory allocated or only one can run at a time forcing the other
requests to sleep until the previous one hadn't been finished. This is also
true for VIDIOC_S_EXT_CTRLS and VIDIOC_TRY_EXT_CTRLS.

Regards,

	Márton Németh

  reply	other threads:[~2009-05-28  6:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25 11:17 [RFC,PATCH] VIDIOC_G_EXT_CTRLS does not handle NULL pointer correctly Laurent Pinchart
2009-05-25 14:16 ` Mauro Carvalho Chehab
2009-06-10 13:52   ` Mauro Carvalho Chehab
2009-06-10 13:53     ` Mauro Carvalho Chehab
2009-06-10 15:49       ` Németh Márton
2009-06-10 21:58       ` Laurent Pinchart
2009-12-10 11:14         ` Laurent Pinchart
2009-12-10 17:22           ` Németh Márton
2009-05-25 19:22 ` Trent Piepho
2009-05-27 15:27   ` Laurent Pinchart
2009-05-28  6:44     ` Németh Márton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-05-27 15:26 [RFC, PATCH] " Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A1E32CE.9090203@freemail.hu \
    --to=nm127@freemail.hu \
    --cc=laurent.pinchart@skynet.be \
    --cc=linux-media@vger.kernel.org \
    --cc=xyzzy@speakeasy.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox