Linux Kernel CIFSTCon()函数远程溢出漏洞

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

BUGTRAQ ID: 34453 Linux Kernel是开放源码操作系统Linux所使用的内核。 Linux Kernel的fs/cifs/connect.c文件中的CIFSTCon()函数存在缓冲区溢出漏洞。如果用户受骗连接到了恶意的服务器且服务器向客户端返回了特制的Tree Connect响应的话,就可以出发这个溢出,导致执行任意代码。以下是有漏洞的代码段: 3441 int 3442 CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, 3443 const char *tree, struct cifsTconInfo *tcon, 3444 const struct nls_table *nls_codepage) 3445 { 3446 struct smb_hdr *smb_buffer; 3447 struct smb_hdr *smb_buffer_response; 3448 TCONX_REQ *pSMB; 3449 TCONX_RSP *pSMBr; 3450 unsigned char *bcc_ptr; 3451 int rc = 0; 3452 int length; 3453 __u16 count; ... 3458 smb_buffer = cifs_buf_get(); ... 3561 if (smb_buffer->Flags2 & SMBFLG2_UNICODE) { 3562 length = UniStrnlen((wchar_t *) bcc_ptr, 512); 3563 if ((bcc_ptr + (2 * length)) - 3564 pByteArea(smb_buffer_response) <= 3565 BCC(smb_buffer_response)) { 3566 kfree(tcon->nativeFileSystem); 3567 tcon->nativeFileSystem = 3568 kzalloc(length + 2, GFP_KERNEL); ... 3579 /* else do not bother copying these information fields*/ ......

0%
暂无可用Exp或PoC
当前有0条受影响产品信息