[Bug 196474] jls causes kernel panic

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jan 4 04:45:10 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196474

--- Comment #4 from Oliver Pinter <op at freebsd.org> ---
please try the following path:

--- sys/kern/vfs_mount.c.orig   2015-01-04 05:38:40.000000000 +0100
+++ sys/kern/vfs_mount.c        2015-01-04 05:38:05.000000000 +0100
@@ -1643,7 +1643,7 @@
                if (opt->value == NULL)
                        opt->len = len;
                else {
-                       if (opt->len < len)
+                       if (len < 0 || opt->len < len)
                                return (EINVAL);
                        opt->len = len;
                        bcopy(value, opt->value, len);

This fixed the problem for me:
root at opn ~# jail -n crashme -c ip4=new persist
root at opn ~# jls
   JID  IP Address      Hostname                      Path
jls: jail_get: Invalid argument

Btw, this is a possible DoS in typical jail based hosting environments.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list