CVE-2006-4178 (CNNVD-200609-428)
中文标题:
FreeBSD I386_Set_LDT()多个本地拒绝服务漏洞
英文标题:
Integer signedness error in the i386_set_ldt call in FreeBSD 5.5, and possibly earlier versions down...
漏洞描述
中文描述:
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 signedness error 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) via unspecified arguments that use negative signed integers to cause the bzero function to be called with a large length parameter, a different vulnerability than CVE-2006-4172.
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:*:*:*:*:*:*:*
|
解决方案
中文解决方案:
英文解决方案:
临时解决方案:
参考链接
cve.org
cve.org
cve.org
cve.org
cve.org
exploitdb
exploitdb
cve.org
CVSS评分详情
AV:L/AC:L/Au:N/C:N/I:N/A:C
时间信息
利用信息
数据源详情
| 数据源 | 记录ID | 版本 | 提取时间 |
|---|---|---|---|
| CVE | cve_CVE-2006-4178 |
2025-11-11 15:17:44 | 2025-11-11 07:32:36 |
| NVD | nvd_CVE-2006-4178 |
2025-11-11 14:51:51 | 2025-11-11 07:41:21 |
| CNNVD | cnnvd_CNNVD-200609-428 |
2025-11-11 15:08:53 | 2025-11-11 07:49:10 |
| EXPLOITDB | exploitdb_EDB-28648 |
2025-11-11 15:05:21 | 2025-11-11 08:24:20 |
版本与语言
安全公告
变更历史
查看详细变更
- references_count: 5 -> 8
- tags_count: 0 -> 4
- data_sources: ['cnnvd', 'cve', 'nvd'] -> ['cnnvd', 'cve', 'exploitdb', 'nvd']
查看详细变更
- vulnerability_type: 未提取 -> 授权问题
- cnnvd_id: 未提取 -> CNNVD-200609-428
- data_sources: ['cve', 'nvd'] -> ['cnnvd', 'cve', 'nvd']
查看详细变更
- cvss_score: 未提取 -> 4.9
- cvss_vector: NOT_EXTRACTED -> AV:L/AC:L/Au:N/C:N/I:N/A:C
- cvss_version: NOT_EXTRACTED -> 2.0
- affected_products_count: 0 -> 5
- data_sources: ['cve'] -> ['cve', 'nvd']