Re: [PATCH net 2/2] net: hamradio: scc: validate bufsize in SIOCSCCSMEM ioctl
Joerg Reuter <[email protected]> Wed, 8 Apr 2026 22:51:05 +0200
| Newsgroups | gmane.linux.hams,gmane.linux.network,gmane.linux.kernel,gmane.linux.kernel.stable |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Am Thu, Apr 09, 2026 at 01:23:58AM +0800 schrieb Mashiro Chen:
> If a privileged user (CAP_SYS_RAWIO) sets bufsize to 0, the receive
> interrupt handler later calls dev_alloc_skb(0) and immediately writes
> a KISS type byte via skb_put_u8() into a zero-capacity socket buffer,
> corrupting the adjacent skb_shared_info region.
Oops, that's unfortunate.
> The scc.c comment already states the buffer must not exceed 4096 bytes,
> but this limit is never enforced.
That was a limit 30 years ago when we couldn't have skbs larger than one
page.
I'm not sure if anyone is actually using AX.25 jumbograms with a Zilog SCC
controller, that doesn't make much sense to me. But maybe someone out there
is indeed running IP over huge AX.25 UI frames, thus I'm not a fan of
enforcing an upper limit either. It's hamradio, you're supposed to tinker.
I'm okay with a mininum size of 16, of course.
73,
Joerg
--
Joerg Reuter http://yaina.de/jreuter
And I make my way to where the warm scent of soil fills the evening air.
Everything is waiting quietly out there.... (Anne Clark)