MDVA-2012:046 : initscripts

2012-05-30T00:00:00
ID MANDRIVA_MDVA-2012-046.NASL
Type nessus
Reporter Tenable
Modified 2018-07-19T00:00:00

Description

Xorg and chvt 1 call (in /etc/rc.d/rc) can be deadlocking one another if shutdown is requested using ACPI (or any other mean), which will cause X to stop while, at the same time, /etc/rc.d/rc0/6 is running, causing chvt 1 to be called. When this happen, chvt call is blocked and shutdown / reboot doesn't happen. You need to press Ctrl-F1 to change VT and unlock everything. To fix that, a patch in chvt is needed to replace ioctl which is blocking kernel side to a userspace temporary lock.

This update corrects the problem.

                                        
                                            #%NASL_MIN_LEVEL 70103

#%NASL_MIN_LEVEL 99999
# @DEPRECATED@
#
# This script has been deprecated as the associated patch is not
# currently a security fix.
#
# Disabled on 2012/09/06.
#

#
# (C) Tenable Network Security, Inc.
#
# This script was automatically generated from
# Mandriva Linux Security Advisory MDVA-2012:046.
#

if (!defined_func("bn_random")) exit(0);

include("compat.inc");

if (description)
{
  script_id(59303);
  script_version("1.4");
  script_cvs_date("Date: 2018/07/19 20:59:17");

  script_name(english:"MDVA-2012:046 : initscripts");
  script_summary(english:"Checks for patch(es) in 'rpm -qa' output");

  script_set_attribute(attribute:"synopsis", value: 
"The remote Mandriva host is missing one or more security-related
patches.");
  script_set_attribute(attribute:"description", value:
"Xorg and chvt 1 call (in /etc/rc.d/rc) can be deadlocking one another
if shutdown is requested using ACPI (or any other mean), which will
cause X to stop while, at the same time, /etc/rc.d/rc0/6 is running,
causing chvt 1 to be called. When this happen, chvt call is blocked
and shutdown / reboot doesn't happen. You need to press Ctrl-F1 to
change VT and unlock everything. To fix that, a patch in chvt is
needed to replace ioctl which is blocking kernel side to a userspace
temporary lock.

This update corrects the problem.");
  script_set_attribute(attribute:"see_also", value:"http://www.mandriva.com/security/advisories?name=MDVA-2012:046");
  script_set_attribute(attribute:"solution", value:"Update the affected package(s).");
  script_set_attribute(attribute:"risk_factor", value:"High");
  script_set_attribute(attribute:"patch_publication_date", value:"2012/05/29");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:linux");
  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"plugin_publication_date", value:"2012/05/30");
  script_end_attributes();
 
  script_category(ACT_GATHER_INFO);
  script_family(english:"Mandriva Local Security Checks");
 
  script_copyright(english:"This script is Copyright (C) 2012-2018 Tenable Network Security, Inc.");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/Mandrake/release", "Host/Mandrake/rpm-list");

  exit(0);
}

# Deprecated.
exit(0, "The associated patch is not currently a security fix.");


include("global_settings.inc");
include("rpm.inc");

if (!get_kb_item("Host/local_checks_enabled")) exit(0, "Local checks are not enabled.");
if (!get_kb_item("Host/Mandrake/release")) exit(0, "The host is not running Mandrake Linux.");
if (!get_kb_item("Host/Mandrake/rpm-list")) exit(1, "Could not get the list of packages.");

flag = 0;

if (rpm_check(reference:"debugmode-8.99-16.1mdv2010.2", release:"MDK2010.1", cpu:"i386", yank:"mdv")) flag++;
if (rpm_check(reference:"initscripts-8.99-16.1mdv2010.2", release:"MDK2010.1", cpu:"i386", yank:"mdv")) flag++;
if (rpm_check(reference:"kbd-1.15.2-2.1mdv2010.2", release:"MDK2010.1", cpu:"i386", yank:"mdv")) flag++;

if (rpm_check(reference:"debugmode-8.99-16.1mdv2010.2", release:"MDK2010.1", cpu:"x86_64", yank:"mdv")) flag++;
if (rpm_check(reference:"initscripts-8.99-16.1mdv2010.2", release:"MDK2010.1", cpu:"x86_64", yank:"mdv")) flag++;
if (rpm_check(reference:"kbd-1.15.2-2.1mdv2010.2", release:"MDK2010.1", cpu:"x86_64", yank:"mdv")) flag++;


if (flag)
{
  if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
  else security_hole(0);
  exit(0);
}
else 
{
  exit(0, "The host is not affected.");
}