ngctl can crash the kernel
freebsd-tracker-int0dh at mail.ru
Fri Nov 5 15:18:23 UTC 2010
The following commands lead the 9.0-CURRENT kernel to crash:
[root at freebsd /usr/home/int0dh]# ngctl
config get or set configuration of node at <path>
connect Connects hook <peerhook> of the node at <relpath> to <hook>
debug Get/set debugging verbosity level
dot Produce a GraphViz (.dot) of the entire netgraph.
help Show command summary or get more help on a specific command
list Show information about all nodes
mkpeer Create and connect a new node to the node at "path"
msg Send a netgraph control message to the node at "path"
name Assign name <name> to the node at <path>
read Read and execute commands from a file
rmhook Disconnect hook "hook" of the node at "path"
show Show information about the node at <path>
shutdown Shutdown the node at <path>
status Get human readable status information from the node at <path>
types Show information about all installed node types
write Send a data packet down the hook named by "hook".
quit Exit program
+ mkpeer ksocket myhook inet/stream/tcp
+ msg .:myhook connect inet/127.0.0.1:22
After last command the kernel panics.
Any listening TCP port can be used instead of 22.
The panic occurs here (sys/kern/uipc_sockbuf.c):
sbappendaddr_locked(struct sockbuf *sb, const struct sockaddr *asa,
struct mbuf *m0, struct mbuf *control)
struct mbuf *m, *n, *nlast;
int space = asa->sa_len;
if (m0 && (m0->m_flags & M_PKTHDR) == 0)
I`ve tried with the custom kernel only, but I think that issue can be reproduced with GENERIC too.
More information about the freebsd-current