Date: Wed, 29 Aug 2007 11:13:25 +0900 From: "George V. Neville-Neil" <gnn@neville-neil.com> To: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= <jinmei@isl.rdc.toshiba.co.jp> Cc: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, blue <susan.lan@zyxel.com.tw>, freebsd-net@freebsd.org Subject: Re: infinite loop in esp6_ctlinput()? Message-ID: <m2lkbvnl4q.wl%gnn@neville-neil.com> In-Reply-To: <m1tzqjsmog.wl%jinmei@isl.rdc.toshiba.co.jp> References: <46D38543.4020507@zyxel.com.tw> <m11wdote2t.wl%jinmei@isl.rdc.toshiba.co.jp> <46D3B747.1090903@zyxel.com.tw> <20070828092348.Y87821@maildrop.int.zabbadoz.net> <46D40BB7.4060100@zyxel.com.tw> <m1tzqjsmog.wl%jinmei@isl.rdc.toshiba.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
At Wed, 29 Aug 2007 00:28:47 +0900, jinmei wrote: > > At Tue, 28 Aug 2007 19:49:11 +0800, > blue <susan.lan@zyxel.com.tw> wrote: > > > According to the GDB backtrace, I think this is what I am talking about. > > > > Besides, this would result in infinite loop just by looking at the > > codes. However, the author seems knowing the problem, too. The comments > > in esp6_ctlinput() point out: > > /* > > * Although pfctlinput2 will call esp6_ctlinput(), there is > > * no possibility of an infinite loop of function calls, > > * because we don't pass the inner IPv6 header. > > */ > > > > I am not sure what the description means. The behavior of > > esp6_ctlinput() is the same in HEAD, too. > > This means that variable 'ip6' should be NULL for the second time > esp6_ctlinput() is called in the esp_input.c ("non-FAST" IPSEC) > version. It prevents the function calls from making an infinite loop. > > On the other hand, the ipsec_input.c (FAST_IPSEC) version only seems > to check ip6ctlparam * ('d') is NULL, making the infinite sequence of > calls possible. I am now going over the code that Jinmei-san has kindly pointed out and will attempt a patch soon. I am also hoping to develop a reliable way to trigger this bug, based on the report from Pawel Worach on current@. Best, George
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m2lkbvnl4q.wl%gnn>