Thread (34 messages) 34 messages, 10 authors, 2019-11-29

Re: [PATCH] ipv4: Delete uncached routes upon unregistration of loopback device.

From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Date: 2019-05-04 17:15:14
Also in: lkml

On 2019/05/05 0:56, Eric Dumazet wrote:> 
Well, you have not fixed a bug, you simply made sure that whatever cpu is using the
routes you forcibly deleted is going to crash the host very soon (use-after-frees have
undefined behavior, but KASAN should crash most of the times)
I confirmed that this patch survives "#syz test:" before submitting.
But you know that this patch is deleting the route entry too early. OK.
Please do not send patches like that with a huge CC list, keep networking patches
to netdev mailing list.
If netdev people started working on this "minutely crashing bug" earlier,
I would not have written a patch...
Mahesh has an alternative patch, adding a fake device that can not be dismantled
to make sure we fully intercept skbs sent through a dead route, instead of relying
on loopback dropping them later at some point.
So, the reason to temporarily move the refcount is to give enough period
so that the route entry is no longer used. But moving the refcount to a
loopback device in a namespace was wrong. Is this understanding correct?

Compared to moving the refcount to the loopback device in the init namespace,
the fake device can somehow drop the refcount moved via rt_flush_dev(), can't it?

Anyway, I'll wait for Mahesh.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help