FreeBSD Bugzilla – Attachment 151321 Details for
Bug 196483
[patch] change vfs_setopt{,_part}(...)'s len parameter to fix possible DoS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-HBSD-change-vfs_setopt-_part-.-s-len-type-to-check-b.patch
0001-HBSD-change-vfs_setopt-_part-.-s-len-type-to-check-b.patch (text/plain), 1.90 KB, created by
Oliver Pinter
on 2015-01-04 13:32:07 UTC
(
hide
)
Description:
0001-HBSD-change-vfs_setopt-_part-.-s-len-type-to-check-b.patch
Filename:
MIME Type:
Creator:
Oliver Pinter
Created:
2015-01-04 13:32:07 UTC
Size:
1.90 KB
patch
obsolete
>From 7cc6ffbda459280327491d43cf4514f7296728d4 Mon Sep 17 00:00:00 2001 >From: Oliver Pinter <oliver.pinter@hardenedbsd.org> >Date: Sun, 4 Jan 2015 14:13:40 +0100 >Subject: [PATCH 1/2] HBSD: change vfs_setopt{,_part}(...)'s len type, to check > boundaries, and follow bcopy(...)'s expectation > >FreeBSD-PR: 196474 >Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org> >--- > sys/kern/vfs_mount.c | 4 ++-- > sys/sys/mount.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c >index b2b4969..8666787 100644 >--- a/sys/kern/vfs_mount.c >+++ b/sys/kern/vfs_mount.c >@@ -1611,7 +1611,7 @@ vfs_scanopt(struct vfsoptlist *opts, const char *name, const char *fmt, ...) > } > > int >-vfs_setopt(struct vfsoptlist *opts, const char *name, void *value, int len) >+vfs_setopt(struct vfsoptlist *opts, const char *name, void *value, size_t len) > { > struct vfsopt *opt; > >@@ -1632,7 +1632,7 @@ vfs_setopt(struct vfsoptlist *opts, const char *name, void *value, int len) > } > > int >-vfs_setopt_part(struct vfsoptlist *opts, const char *name, void *value, int len) >+vfs_setopt_part(struct vfsoptlist *opts, const char *name, void *value, size_t len) > { > struct vfsopt *opt; > >diff --git a/sys/sys/mount.h b/sys/sys/mount.h >index 6fb2d08..4ec86b8 100644 >--- a/sys/sys/mount.h >+++ b/sys/sys/mount.h >@@ -856,9 +856,9 @@ int vfs_filteropt(struct vfsoptlist *, const char **legal); > void vfs_opterror(struct vfsoptlist *opts, const char *fmt, ...); > int vfs_scanopt(struct vfsoptlist *opts, const char *name, const char *fmt, ...); > int vfs_setopt(struct vfsoptlist *opts, const char *name, void *value, >- int len); >+ size_t len); > int vfs_setopt_part(struct vfsoptlist *opts, const char *name, void *value, >- int len); >+ size_t len); > int vfs_setopts(struct vfsoptlist *opts, const char *name, > const char *value); > int vfs_setpublicfs /* set publicly exported fs */ >-- >2.2.1 >
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 196483
: 151321