lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 07 Jul 2010 14:52:58 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	Jarod Wilson <jarod@...hat.com>
CC:	Mauro Carvalho Chehab <mchehab@...hat.com>,
	linux-media@...r.kernel.org,
	Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: MEDIA: lirc, improper locking

Hi,

stanse found a locking error in lirc_dev_fop_read:
if (mutex_lock_interruptible(&ir->irctl_lock))
  return -ERESTARTSYS;
...
while (written < length && ret == 0) {
  if (mutex_lock_interruptible(&ir->irctl_lock)) {    #1
    ret = -ERESTARTSYS;
    break;
  }
  ...
}

remove_wait_queue(&ir->buf->wait_poll, &wait);
set_current_state(TASK_RUNNING);
mutex_unlock(&ir->irctl_lock);                        #2

If lock at #1 fails, it beaks out of the loop, with the lock unlocked,
but there is another "unlock" at #2.

regards,
-- 
js
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ