FreeBSD Bugzilla – Attachment 194438 Details for
Bug 228354
mount_smbfs - long hostname causes stack overflow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
check hostname length
smbfs-hostname-overflow.diff (text/plain), 792 bytes, created by
Brooks Davis
on 2018-06-20 18:25:40 UTC
(
hide
)
Description:
check hostname length
Filename:
MIME Type:
Creator:
Brooks Davis
Created:
2018-06-20 18:25:40 UTC
Size:
792 bytes
patch
obsolete
>diff --git a/contrib/smbfs/lib/smb/ctx.c b/contrib/smbfs/lib/smb/ctx.c >index 2458607f2a6..8732b251fe5 100644 >--- a/contrib/smbfs/lib/smb/ctx.c >+++ b/contrib/smbfs/lib/smb/ctx.c >@@ -549,6 +549,8 @@ smb_ctx_resolve(struct smb_ctx *ctx) > } > nn.nn_scope = ctx->ct_nb->nb_scope; > nn.nn_type = NBT_SERVER; >+ if (strlen(ssn->ioc_srvname) > NB_NAMELEN) >+ return NBERROR(NBERR_NAMETOOLONG); > strcpy(nn.nn_name, ssn->ioc_srvname); > error = nb_sockaddr(sap, &nn, &saserver); > nb_snbfree(sap); >@@ -565,6 +567,8 @@ smb_ctx_resolve(struct smb_ctx *ctx) > } > nls_str_upper(ctx->ct_locname, ctx->ct_locname); > } >+ if (strlen(ctx->ct_locname) > NB_NAMELEN) >+ return NBERROR(NBERR_NAMETOOLONG); > strcpy(nn.nn_name, ctx->ct_locname); > nn.nn_type = NBT_WKSTA; > nn.nn_scope = ctx->ct_nb->nb_scope;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 228354
: 194438