Re: N_HDLC line discipline: Race condition

From: Dianne Skoll
Date: Thu Apr 25 2024 - 14:01:50 EST


Hi,

I have (somewhat) narrowed down when the kernel bug appeared by installing
Debian 10, 11 and 12 in KVM virtual machines.

The bug is NOT present in Debian 10, kernel version 4.19.67.

The bug IS present in Debian 11, kernel version 5.10.209

The bug IS present in Debian 12, kernel version 6.1.85

So I guess it was introduced sometime between 4.19.67 and 5.10.209. I'll
take a look to see if I can do a git bisect.

[To recap, the bug is that the N_HDLC line discipline sometimes
coalesces two write()s so you get them both back in a single read()
which is contrary to what it's supposed to do... preserve the write
boundaries as individual frames.]

Regards,

Dianne