mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG] BUG: unable to handle kernel paging request in asix_resume
@ 2026-12-01 20:03 Farhad Alemi
  2026-12-02  7:16 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Farhad Alemi @ 2026-12-01 20:03 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet
  Cc: netdev, linux-usb, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 6320 bytes --]

Hello,

We are reporting the following crash (reproducer attached):
Linux version 7.4.0-rc5-00048-g693c2e04e3f1
Build Config: UpstreamAppArmorKASAN (KASAN + UBSAN, panic_on_warn=1)

[   29.649311][ T7316] usb 1-1: new high-speed USB device number 2
using dummy_hcd
[   29.799942][ T7316] usb 1-1: New USB device found: idVendor=0b95,
idProduct=172a, bcdDevice=0.00
[   29.801165][ T7316] usb 1-1: New USB device strings: Mfr=0,
Product=0, SerialNumber=0
[   29.812101][ T7316] hub 1-1:1.0: bad descriptor, ignoring hub
[   29.812118][ T7316] hub 1-1:1.0: probe with driver hub failed with error -5
[   30.643961][ T7316] asix 1-1:1.0 (unnamed net_device)
(uninitialized): registered mdio bus usb-001:002
[   30.650737][ T7316] asix 1-1:1.0 eth1: register 'asix' at
usb-dummy_hcd.0-1, ASIX AX88172A USB 2.0 Ethernet, 56:fb:67:74:00:cf
[   30.739956][ T9489] kernel tried to execute NX-protected page -
exploit attempt? (uid: 0)
[   30.743866][ T9489] BUG: unable to handle page fault for address:
ffff888020eb4000
[   30.747392][ T9489] #PF: supervisor instruction fetch in kernel mode
[   30.750369][ T9489] #PF: error_code(0x0011) - permissions violation
[   30.751799][ T9489] PGD 1325a067 P4D 1325a067 PUD 1325b067 PMD
8000000020e001e3
[   30.753321][ T9489] Oops: Oops: 0011 [#1] SMP KASAN NOPTI
[   30.754423][ T9489] CPU: 0 UID: 0 PID: 9489 Comm: (udev-worker) Not
tainted 7.4.0-rc5-00048-g693c2e04e3f1 #1 PREEMPT(full)
[   30.756548][ T9489] Hardware name: QEMU Standard PC (Q35 + ICH9,
2009), BIOS 1.17.0-debian-1.17.0-1ubuntu1 04/01/2014
[   30.758571][ T9489] RIP: 0010:0xffff888020eb4000
[   30.759514][ T9489] Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 4e 74 8c ff ff ff ff 75 73
62 2d 30 30
[   30.762013][ T9489] RSP: 0018:ffffc9000615f5f8 EFLAGS: 00010293
[   30.762601][ T9489] RAX: ffffffff872ab162 RBX: ffff888024f4b000
RCX: ffff888020521b80
[   30.763416][ T9489] RDX: 0000000000000000 RSI: 0000000000000000
RDI: ffff88810d77eb80
[   30.764176][ T9489] RBP: ffff888024f4b000 R08: ffff888020521b80
R09: 0000000000000002
[   30.764938][ T9489] R10: 0000000000000003 R11: ffff888020eb4000
R12: dffffc0000000000
[   30.765673][ T9489] R13: 0000000000000000 R14: ffff88810d77eb80
R15: ffff888020eb4000
[   30.766398][ T9489] FS:  00007fb1f94509c0(0000)
GS:ffff8880d898d000(0000) knlGS:0000000000000000
[   30.767216][ T9489] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   30.767814][ T9489] CR2: ffff888020eb4000 CR3: 000000001a35b000
CR4: 0000000000752ef0
[   30.768591][ T9489] PKRU: 55555554
[   30.768942][ T9489] Call Trace:
[   30.769302][ T9489]  <TASK>
[   30.769612][ T9489]  ? asix_resume+0x8e/0xb0
[   30.770062][ T9489]  ? usb_resume_both+0x5bc/0xaf0
[   30.770548][ T9489]  ? __pfx_usb_runtime_resume+0x10/0x10
[   30.771098][ T9489]  ? __rpm_callback+0x316/0xa90
[   30.771577][ T9489]  ? ktime_get_mono_fast_ns+0x2d2/0x2f0
[   30.772138][ T9489]  ? __update_runtime_status+0x11e/0x2b0
[   30.772749][ T9489]  ? dev_pm_disable_wake_irq_check+0xb5/0x160
[   30.773340][ T9489]  ? rpm_resume+0xfb1/0x16d0
[   30.773792][ T9489]  ? __pfx_usb_runtime_resume+0x10/0x10
[   30.774336][ T9489]  ? __pfx_rpm_resume+0x10/0x10
[   30.774813][ T9489]  ? __pfx_autoremove_wake_function+0x10/0x10
[   30.775404][ T9489]  ? __pfx__raw_spin_lock+0x10/0x10
[   30.775914][ T9489]  ? _raw_spin_lock_irqsave+0x9c/0x100
[   30.776449][ T9489]  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
[   30.777028][ T9489]  ? stack_depot_save_flags+0x33/0x6e0
[   30.777561][ T9489]  ? rpm_resume+0x876/0x16d0
[   30.778019][ T9489]  ? __pfx_rpm_resume+0x10/0x10
[   30.778495][ T9489]  ? _raw_spin_lock_irqsave+0x9c/0x100
[   30.779028][ T9489]  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
[   30.779601][ T9489]  ? mutex_lock+0x95/0xf0
[   30.780032][ T9489]  ? __pfx_mutex_lock+0x10/0x10
[   30.780548][ T9489]  ? __pm_runtime_resume+0x69/0x90
[   30.781049][ T9489]  ? dev_ethtool+0xcf5/0x2940
[   30.781536][ T9489]  ? __pfx_dev_ethtool+0x10/0x10
[   30.782037][ T9489]  ? inet_ioctl+0x491/0x570
[   30.782506][ T9489]  ? __pfx_inet_ioctl+0x10/0x10
[   30.783047][ T9489]  ? kasan_quarantine_put+0x26/0x180
[   30.783582][ T9489]  ? tomoyo_path_number_perm+0x4c5/0x5d0
[   30.784155][ T9489]  ? dev_ioctl+0x393/0xfc0
[   30.784592][ T9489]  ? sock_do_ioctl+0x23e/0x320
[   30.785061][ T9489]  ? __pfx_sock_do_ioctl+0x10/0x10
[   30.785558][ T9489]  ? sock_ioctl+0x59a/0x7c0
[   30.786010][ T9489]  ? __pfx_sock_ioctl+0x10/0x10
[   30.786491][ T9489]  ? bpf_lsm_file_ioctl+0x9/0x20
[   30.786976][ T9489]  ? __pfx_sock_ioctl+0x10/0x10
[   30.787458][ T9489]  ? __se_sys_ioctl+0xfc/0x170
[   30.787930][ T9489]  ? do_syscall_64+0x128/0x420
[   30.788404][ T9489]  ? clear_bhb_loop+0x40/0x90
[   30.788863][ T9489]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   30.789452][ T9489]  </TASK>
[   30.789757][ T9489] Modules linked in:
[   30.790150][ T9489] CR2: ffff888020eb4000
[   30.790562][ T9489] ---[ end trace 0000000000000000 ]---
[   30.791066][ T9489] RIP: 0010:0xffff888020eb4000
[   30.791072][ T9489] Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 4e 74 8c ff ff ff ff 75 73
62 2d 30 30
[   30.791078][ T9489] RSP: 0018:ffffc9000615f5f8 EFLAGS: 00010293
[   30.791083][ T9489] RAX: ffffffff872ab162 RBX: ffff888024f4b000
RCX: ffff888020521b80
[   30.791088][ T9489] RDX: 0000000000000000 RSI: 0000000000000000
RDI: ffff88810d77eb80
[   30.791092][ T9489] RBP: ffff888024f4b000 R08: ffff888020521b80
R09: 0000000000000002
[   30.791097][ T9489] R10: 0000000000000003 R11: ffff888020eb4000
R12: dffffc0000000000
[   30.791101][ T9489] R13: 0000000000000000 R14: ffff88810d77eb80
R15: ffff888020eb4000
[   30.791106][ T9489] FS:  00007fb1f94509c0(0000)
GS:ffff8880d898d000(0000) knlGS:0000000000000000
[   30.791111][ T9489] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   30.791115][ T9489] CR2: ffff888020eb4000 CR3: 000000001a35b000
CR4: 0000000000752ef0
[   30.791121][ T9489] PKRU: 55555554
[   30.791127][ T9489] Kernel panic - not syncing: Fatal exception
[   30.801395][ T9489] Kernel Offset: disabled
[   30.801945][ T9489] Rebooting in 86400 seconds..


Regards,

[-- Attachment #2: reproducer.c --]
[-- Type: application/octet-stream, Size: 2094 bytes --]

#include <fcntl.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/usb/ch9.h>
#include <linux/usb/raw_gadget.h>

#define EP0_MAX_TRANSFER 256

static const struct usb_device_descriptor device_descriptor = {
	.bLength = USB_DT_DEVICE_SIZE,
	.bDescriptorType = USB_DT_DEVICE,
	.bDeviceClass = USB_CLASS_HUB,
	.bMaxPacketSize0 = 64,
	.idVendor = 0x0b95,
	.idProduct = 0x172a,
	.bNumConfigurations = 1,
};

static const unsigned char configuration_descriptor[] = {
	9, USB_DT_CONFIG, 9 + 9 + 7 + 7, 0, 1, 1, 0, 0, 0,
	9, USB_DT_INTERFACE, 0, 0, 2, 0, 0, 0, 0,
	7, USB_DT_ENDPOINT, USB_DIR_IN | 1, USB_ENDPOINT_XFER_BULK, 0x00, 0x02, 0,
	7, USB_DT_ENDPOINT, USB_DIR_OUT | 2, USB_ENDPOINT_XFER_BULK, 0x00, 0x02, 0,
};

static struct {
	struct usb_raw_event header;
	struct usb_ctrlrequest ctrl;
} event;

static struct {
	struct usb_raw_ep_io header;
	unsigned char data[EP0_MAX_TRANSFER];
} reply;

int main(void)
{
	struct usb_raw_init init = { "dummy_udc", "dummy_udc.0", USB_SPEED_HIGH };
	int raw_gadget_fd = open("/dev/raw-gadget", O_RDWR);

	ioctl(raw_gadget_fd, USB_RAW_IOCTL_INIT, &init);
	ioctl(raw_gadget_fd, USB_RAW_IOCTL_RUN, 0);

	for (;;) {
		struct usb_ctrlrequest *ctrl = &event.ctrl;
		int get_descriptor;

		event.header.length = sizeof(event.ctrl);
		if (ioctl(raw_gadget_fd, USB_RAW_IOCTL_EVENT_FETCH, &event) < 0)
			return 1;
		if (event.header.type != USB_RAW_EVENT_CONTROL)
			continue;
		reply.header.length = ctrl->wLength < EP0_MAX_TRANSFER ? ctrl->wLength : EP0_MAX_TRANSFER;
		memset(reply.data, 0x01, reply.header.length);
		get_descriptor = (ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD &&
				 ctrl->bRequest == USB_REQ_GET_DESCRIPTOR;
		if (get_descriptor && (ctrl->wValue >> 8) == USB_DT_DEVICE)
			memcpy(reply.data, &device_descriptor, sizeof(device_descriptor));
		else if (get_descriptor)
			memcpy(reply.data, configuration_descriptor, sizeof(configuration_descriptor));
		if (ctrl->bRequestType & USB_DIR_IN)
			ioctl(raw_gadget_fd, USB_RAW_IOCTL_EP0_WRITE, &reply);
		else
			ioctl(raw_gadget_fd, USB_RAW_IOCTL_EP0_READ, &reply);
	}
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-02  7:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 20:03 [BUG] BUG: unable to handle kernel paging request in asix_resume Farhad Alemi
2026-12-02  7:16 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®