J-Security Center

Title: Linux Kernel Setsockopt MCAST_MSFILTER Integer Overflow Vulnerability

Severity: HIGH

Description:

An integer-overflow vulnerability has been reported in the 'setsockopt()' system call. This issue is related to the code for handling the MCAST_MSFILTER socket option, which is used to provide the kernel with a list of multicast addresses to be received on the socket. This was introduced as of the 2.4.22/2.6.1 kernel releases.

The specific issue resides in the 'net/ipv4/ip_sockglue.c' source file and is present in the 'ip_setsockopt()' subroutine of the 'setsockopt() system' call. Within this subroutine, an integer overflow occurs within the IP_MSFILTER_SIZE macro, which is used when setting the MCAST_MSFILTER socket option. In particular, the value for the IP_MSFILTER_SIZE macro is used as a length argument when allocating kernel memory. A subsequent 'for' loop could cause kernel memory to be overwritten with arbitrary values that have been specified by the attacker. In this way, an unprivileged user could overwrite kernel structures.

A local attacker may exploit this issue to compromise the system or cause a denial of service. Note that this type of vulnerability may provide a generic means of privilege escalation across Linux distributions after a remote attacker has gained unauthorized access as a lower-privileged user.

Affected Products:

  • Devil-Linux Devil-Linux 1.0.4
  • Devil-Linux Devil-Linux 1.0.5
  • Linux kernel 2.4.22
  • Linux kernel 2.4.23
  • Linux kernel 2.4.23 -ow2
  • Linux kernel 2.4.23 -pre9
  • Linux kernel 2.4.24
  • Linux kernel 2.4.24 -ow1
  • Linux kernel 2.4.25
  • Linux kernel 2.6.1
  • Linux kernel 2.6.1 -rc1
  • Linux kernel 2.6.1 -rc2
  • Linux kernel 2.6.2
  • Linux kernel 2.6.3
  • MandrakeSoft Linux Mandrake 9.2.0
  • MandrakeSoft Linux Mandrake 9.2.0 amd64
  • RedHat Fedora Core1
  • SGI ProPack 3.0.0
  • Slackware Linux -current
  • Slackware Linux 9.1.0
  • Trustix Secure Linux 2.0.0

References:

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.