CVE-2006-4172 (CNNVD-200609-441)

HIGH
中文标题:
FreeBSD I386_Set_LDT()多个本地拒绝服务漏洞
英文标题:
Integer overflow vulnerability in the i386_set_ldt call in FreeBSD 5.5, and possibly earlier version...
CVSS分数: 7.2
发布时间: 2006-09-26 01:43:00
漏洞类型: 授权问题
状态: PUBLISHED
数据质量分数: 0.30
数据版本: v3
漏洞描述
中文描述:

FreeBSD就是一种运行在Intel平台上、可以自由使用的开放源码Unix类系统。 FreeBSD中的i386_set_ldt()调用允许用户系统的程序动态管理每个进程的本地描述符表。由于使用了有符号的整数且缺少输入验证,内核中bzero可能会被要求处理很大的参数,漏洞代码如下: 415 int error = 0, i; 416 int largest_ld; .. 449 largest_ld = uap->start + uap->num; 450 if (largest_ld > pldt->ldt_len) 451 largest_ld = pldt->ldt_len; 452 i = largest_ld - uap->start; 453 bzero( &((union descriptor *)(pldt->ldt_base))[uap->start], 454 sizeof(union descriptor) * i); 在415和416行,"i"和"largest_ld"变量都是有符的整数。在449行,同时添加了uap->start和uap->num,这两个变量都是用户控制的且没有经过正确的检查。在452行,可以将"i"设置为很大的负值,导致在453行以很大的长度参数调用bzero。无效的内存访问会导致内核忙碌。 i386_set_ldt()系统调用会在LDT中设置当前进程的i386描述符列表。该调用接受一个开始选择器数(start)、包含有将要设置描述符的内存数组(descs),以及将要设置的条目数(num)。用户在通过sysarch()调用i386_set_ldt()时,如果将start参数设置为很低的整数值、将descs设置为非空的值,并将num设置为很高的无符整数值,就会触发largest_ld和descs_size(533和540行)中的整数溢出,导致耗尽所有可用的系统资源(541行)。此外还可以将start参数设置为低整数值、descs设置为空、num设置为很高的无符整数值触发largest_ld(515行)中的整数溢出,导致删除系统中的敏感数据(519和520行)。有漏洞的函数如下: 476 static int 477 i386_set_ldt(td, args) 478 struct thread *td; 479 char *args; 480 { 481 int error = 0, i; 482 int largest_ld; 483 struct mdproc *mdp = &td->td_proc->p_md; 484 struct proc_ldt *pldt = 0; 485 struct i386_ldt_args ua, *uap = &ua; 486 union descriptor *descs, *dp; 487 int descs_size; 488 489 if ((error = copyin(args, uap, sizeof(struct i386_ldt_args))) < 0) 490 return(error); 491 492 #ifdef DEBUG 493 printf("i386_set_ldt: start=%d num=%d descs=%p\n", 494 uap->start, uap->num, (void *)uap->descs); 495 #endif 496 497 if (uap->descs == NULL) { 498 /* Free descriptors */ 499 if (uap->start == 0 & & uap->num == 0) { 500 /* 501 * Treat this as a special case, so userland needn't 502 * know magic number NLDT. 503 */ 504 uap->start = NLDT; 505 uap->num = MAX_LD - NLDT; 506 } 507 if (uap->start <= LUDATA_SEL || uap->num <= 0)508 return (EINVAL); 509 mtx_lock_spin( &sched_lock); 510 pldt = mdp->md_ldt; 511 if (pldt == NULL || uap->start >= pldt->ldt_len) { 512 mtx_unlock_spin( &sched_lock); 513 return (0); 514 } 515 largest_ld = uap->start + uap->num; 516 if (largest_ld > pldt->ldt_len) 517 largest_ld = pldt->ldt_len; 518 i = largest_ld - uap->start; 519 bzero( &((union descriptor *)(pldt->ldt_base))[uap->start], 520 sizeof(union descriptor) * i); 521 mtx_unlock_spin( &sched_lock); 522 return (0); 523 } 524 525 if (!(uap->start == LDT_AUTO_ALLOC & & uap->num == 1)) { 526 /* complain a for a while if using old methods */ 527 if (ldt_warnings++ < NUM_LDT_WARNINGS) { 528 printf("Warning: pid %d used static ldt allocation.\n", 529 td->td_proc->p_pid); 530 printf("See the i386_set_ldt man page for more info\n"); 531 } 532 /* verify range of descriptors to modify */ 533 largest_ld = uap->start + uap->num; 534 if (uap->start >= MAX_LD || 535 uap->num < 0 || largest_ld > MAX_LD) { 536 return (EINVAL); 537 } 538 } 539 540 descs_size = uap->num * sizeof(union descriptor); 541 descs = (union descriptor *)kmem_alloc(kernel_map, descs_size); 542 if (descs == NULL) 543 return (ENOMEM); 544 error = copyin(uap->descs

英文描述:

Integer overflow vulnerability in the i386_set_ldt call in FreeBSD 5.5, and possibly earlier versions down to 5.2, allows local users to cause a denial of service (crash) and possibly execute arbitrary code via unspecified vectors, a different vulnerability than CVE-2006-4178.

CWE类型:
(暂无数据)
标签:
(暂无数据)
受影响产品
厂商 产品 版本 版本范围 平台 CPE
freebsd freebsd * - - cpe:2.3:o:freebsd:freebsd:*:*:*:*:*:*:*:*
freebsd freebsd 5.2 - - cpe:2.3:o:freebsd:freebsd:5.2:*:*:*:*:*:*:*
freebsd freebsd 5.2.1 - - cpe:2.3:o:freebsd:freebsd:5.2.1:*:*:*:*:*:*:*
freebsd freebsd 5.3 - - cpe:2.3:o:freebsd:freebsd:5.3:*:*:*:*:*:*:*
freebsd freebsd 5.4 - - cpe:2.3:o:freebsd:freebsd:5.4:*:*:*:*:*:*:*
解决方案
中文解决方案:
(暂无数据)
英文解决方案:
(暂无数据)
临时解决方案:
(暂无数据)
参考链接
freebsd-i386setldt-overflow(29132) vdb-entry
cve.org
访问
20060925 iDefense Security Advisory 09.23.06: FreeBSD i386_set_ldt Integer Overflow Vulnerability mailing-list
cve.org
访问
1016926 vdb-entry
cve.org
访问
22064 third-party-advisory
cve.org
访问
20158 vdb-entry
cve.org
访问
1016928 vdb-entry
cve.org
访问
20060923 FreeBSD i386_set_ldt Integer Overflow Vulnerability third-party-advisory
cve.org
访问
20060923 [RISE-2006002] FreeBSD 5.x kernel i386_set_ldt() integer overflow vulnerability mailing-list
cve.org
访问
CVSS评分详情
7.2
HIGH
CVSS向量: AV:L/AC:L/Au:N/C:C/I:C/A:C
CVSS版本: 2.0
机密性
COMPLETE
完整性
COMPLETE
可用性
COMPLETE
时间信息
发布时间:
2006-09-26 01:43:00
修改时间:
2024-08-07 18:57:46
创建时间:
2025-11-11 15:32:36
更新时间:
2025-11-11 15:49:10
利用信息
暂无可利用代码信息
数据源详情
数据源 记录ID 版本 提取时间
CVE cve_CVE-2006-4172 2025-11-11 15:17:44 2025-11-11 07:32:36
NVD nvd_CVE-2006-4172 2025-11-11 14:51:51 2025-11-11 07:41:21
CNNVD cnnvd_CNNVD-200609-441 2025-11-11 15:08:53 2025-11-11 07:49:10
版本与语言
当前版本: v3
主要语言: EN
支持语言:
EN ZH
安全公告
暂无安全公告信息
变更历史
v3 CNNVD
2025-11-11 15:49:10
vulnerability_type: 未提取 → 授权问题; cnnvd_id: 未提取 → CNNVD-200609-441; data_sources: ['cve', 'nvd'] → ['cnnvd', 'cve', 'nvd']
查看详细变更
  • vulnerability_type: 未提取 -> 授权问题
  • cnnvd_id: 未提取 -> CNNVD-200609-441
  • data_sources: ['cve', 'nvd'] -> ['cnnvd', 'cve', 'nvd']
v2 NVD
2025-11-11 15:41:21
severity: SeverityLevel.MEDIUM → SeverityLevel.HIGH; cvss_score: 未提取 → 7.2; cvss_vector: NOT_EXTRACTED → AV:L/AC:L/Au:N/C:C/I:C/A:C; cvss_version: NOT_EXTRACTED → 2.0; affected_products_count: 0 → 5; data_sources: ['cve'] → ['cve', 'nvd']
查看详细变更
  • severity: SeverityLevel.MEDIUM -> SeverityLevel.HIGH
  • cvss_score: 未提取 -> 7.2
  • cvss_vector: NOT_EXTRACTED -> AV:L/AC:L/Au:N/C:C/I:C/A:C
  • cvss_version: NOT_EXTRACTED -> 2.0
  • affected_products_count: 0 -> 5
  • data_sources: ['cve'] -> ['cve', 'nvd']