landhb / drawbridge Goto Github PK
View Code? Open in Web Editor NEWLayer 4 Single Packet Authentication Linux kernel module utilizing Netfilter hooks and kernel supported Berkeley Packet Filters (BPF)
License: GNU General Public License v3.0
Layer 4 Single Packet Authentication Linux kernel module utilizing Netfilter hooks and kernel supported Berkeley Packet Filters (BPF)
License: GNU General Public License v3.0
Using two wget
concurrently downloading 256M+ files on unlock port, it crashes. on 32-core CPU machines.
Last message:
Message from vagrant at Nov 11 17:51:29 ...
kernel:Kernel panic - not syncing: Fatal exception in interrupt
kernel version:
# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
# uname -a
Linux vagrant 5.4.188-1.el7.elrepo.x86_64 #1 SMP Mon Mar 28 09:10:07 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux
There's a few issues currently blocking 5.x compatibility.
run "sudo trigger 127.0.0.1 22 ../private.pem" ,I can't find trigger commmand.
How to install the command?
Hello I saw that you have used the crypto api of Linux in your project. I saw that you used the crypto_akcipher_verify interface. May I ask if you have used other crypto_akcipher_encrypt and crypto_akcipher_decrypt api? I have a problem when using the public key for decryption
, Have you tried to decrypt successfully with the public key?
Looking forward to your!
When the client uses the wrong certificate
./tools/target/debug/db auth --server=127.0.0.1 --dport=53 --unlock=8000 --interface=lo --protocol=udp --key=./wrong_key
crypto_ahash_digest
will generate a crash
[ 1260.139182] Unable to handle kernel paging request at virtual address ffff80000bf8be5c
[ 1260.141891] Mem abort info:
[ 1260.143340] ESR = 0x96000004
[ 1260.144036] Exception class = DABT (current EL), IL = 32 bits
[ 1260.145401] SET = 0, FnV = 0
[ 1260.146214] EA = 0, S1PTW = 0
[ 1260.148202] Data abort info:
[ 1260.149063] ISV = 0, ISS = 0x00000004
[ 1260.149918] CM = 0, WnR = 0
[ 1260.150829] swapper pgtable: 4k pages, 48-bit VAs, pgd = 00000000c83095c5
[ 1260.152678] [ffff80000bf8be5c] *pgd=0000000000000000
[ 1260.153631] Internal error: Oops: 96000004 [#1] SMP
[ 1260.154663] Modules linked in: drawbridge(OE) nls_iso8859_1 snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep binfmt_misc snd_pcm input_leds joydev snd_timer snd qemu_fw_cfg soundcore sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi virtio_rng ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor uas usb_storage raid6_pq libcrc32c raid1 raid0 multipath linear hid_generic usbhid hid aes_ce_blk aes_ce_cipher crc32_ce crct10dif_ce ghash_ce sha2_ce sha256_arm64 sha1_ce virtio_blk virtio_net aes_neon_bs aes_neon_blk crypto_simd cryptd aes_arm64
[ 1260.168398] Process drawbridge (pid: 1642, stack limit = 0x0000000057b39291)
[ 1260.169493] CPU: 2 PID: 1642 Comm: drawbridge Tainted: G OE 4.15.0-156-generic #163-Ubuntu
[ 1260.171010] Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015
[ 1260.172269] pstate: 80c00005 (Nzcv daif +PAN +UAO)
[ 1260.173020] pc : __memcpy+0x84/0x180
[ 1260.173575] lr : sha256_ce_finup+0x240/0x450 [sha2_ce]
[ 1260.174419] sp : ffff00000bf8b890
[ 1260.174954] x29: ffff00000bf8b890 x28: 0000000000000000
[ 1260.176059] x27: 000000000000ffff x26: 000000000000027e
[ 1260.176830] x25: 0000000000000000 x24: 0000000000000000
[ 1260.177740] x23: ffff80000bf8be5c x22: 000000000000000a
[ 1260.178612] x21: ffffc7ba36960b00 x20: ffffc7ba33f0f280
[ 1260.179622] x19: ffffc7ba33f0f300 x18: ffffffffffffffff
[ 1260.180514] x17: 0000ffffb05b4278 x16: ffff59d3fc9edf00
[ 1260.181317] x15: ffff59d3fd458c08 x14: ffff59d3fd61bcd0
[ 1260.182077] x13: ffff59d3fd61b8fc x12: ffff59d3fd480000
[ 1260.182839] x11: 0000000000000000 x10: ffff59d3fd61b000
[ 1260.183568] x9 : 0000000000000000 x8 : ffffc7ba36960b80
[ 1260.184230] x7 : 0000000000000000 x6 : ffffc7ba33f0f328
[ 1260.184901] x5 : bb67ae856a09e667 x4 : ffff59d33abb12a8
[ 1260.185543] x3 : 00006de642fad000 x2 : 000000000000000a
[ 1260.186171] x1 : ffff80000bf8be5c x0 : ffffc7ba33f0f328
[ 1260.186800] Call trace:
[ 1260.187111] __memcpy+0x84/0x180
[ 1260.187537] crypto_shash_finup+0x58/0x80
[ 1260.188028] shash_ahash_finup+0x58/0xd8
[ 1260.188376] shash_ahash_digest+0x7c/0x110
[ 1260.188772] shash_async_digest+0x3c/0x48
[ 1260.189265] crypto_ahash_op+0x40/0x98
[ 1260.189704] crypto_ahash_digest+0x30/0x48
[ 1260.190182] gen_digest+0xe4/0x178 [drawbridge]
[ 1260.190792] validate_packet+0x48/0x1c8 [drawbridge]
[ 1260.191560] listen+0x254/0x388 [drawbridge]
[ 1260.192225] kthread+0x134/0x138
[ 1260.192615] ret_from_fork+0x10/0x18
[ 1260.193037] Code: a88120c7 a8c12027 a88120c7 36180062 (f8408423)
[ 1260.193725] ---[ end trace 6c37773714b2518b ]---
Hello. Could you maybe add some more topics to this repo?
CPU: 4 cores
# uname -a
Linux ubuntu-bionic 4.15.0-193-generic #204-Ubuntu SMP Fri Aug 26 19:20:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
db auth
authentication passedThen the drawbridge.ko timer expired, dmesg outputs a lot of error messages:
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.567079] [*] Timer expired, checking connections...
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.567225] BUG: scheduling while atomic: swapper/3/0/0x00000100
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572419] Modules linked in: drawbridge(OE) vboxsf isofs input_leds vboxguest video serio_raw binfmt_misc sch_fq_codel ib_iser rdma_c
m iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables x_tables autofs4 btrfs zstd_compress raid10 rai
d456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni
_intel mptspi aes_x86_64 scsi_transport_spi crypto_simd mptscsih glue_helper cryptd mptbase psmouse e1000 [last unloaded: drawbridge]
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572455] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G OE 4.15.0-193-generic #204-Ubuntu
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572458] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572459] Call Trace:
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572461] <IRQ>
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572473] dump_stack+0x6d/0x8b
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572477] __schedule_bug+0x55/0x70
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572479] __schedule+0x658/0x890
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572481] schedule+0x2c/0x80
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572485] schedule_timeout+0x1cf/0x370
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572488] ? native_write_msr+0xa/0x30
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572491] ? native_apic_msr_write+0x2b/0x40
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572493] wait_for_completion+0xba/0x140
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572495] ? wake_up_q+0x80/0x80
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572528] __wait_rcu_gp+0x134/0x160
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572532] ? reap_expired_connections+0xe0/0xe0 [drawbridge]
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572534] synchronize_sched+0x5d/0x80
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572535] ? call_rcu_bh+0x20/0x20
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572537] ? trace_raw_output_rcu_utilization+0x50/0x50
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572539] reap_expired_connections+0x8f/0xe0 [drawbridge]
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572540] reap_expired_connections_new+0x12/0x20 [drawbridge]
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572542] call_timer_fn+0x30/0x130
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572543] run_timer_softirq+0x3f3/0x430
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572545] ? kvm_clock_get_cycles+0x1e/0x20
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572547] ? ktime_get+0x43/0xb0
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572548] ? native_apic_msr_write+0x2b/0x40
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572551] ? lapic_next_event+0x20/0x30
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572554] __do_softirq+0xe4/0x2d4
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572557] irq_exit+0xc5/0xd0
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572558] smp_apic_timer_interrupt+0x79/0x140
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572560] apic_timer_interrupt+0x90/0xa0
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572561] </IRQ>
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572563] RIP: 0010:native_safe_halt+0x12/0x20
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572564] RSP: 0018:ffffa5e94069fe80 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff11
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572565] RAX: ffffffff933d03f0 RBX: 0000000000000003 RCX: 0000000000000000
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572566] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572567] RBP: ffffa5e94069fe80 R08: 000002592ad72c6c R09: ffff8cf5765a6800
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572567] R10: 0000000000000000 R11: 0000029bf8a296fb R12: 0000000000000003
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572568] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572569] ? __sched_text_end+0x1/0x1
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572571] default_idle+0x20/0x100
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572574] arch_cpu_idle+0x15/0x20
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572575] default_idle_call+0x23/0x30
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572578] do_idle+0x172/0x1f0
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572580] cpu_startup_entry+0x73/0x80
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572582] start_secondary+0x1ab/0x200
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572584] secondary_startup_64+0xa5/0xb0
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.572590] bad: scheduling from the idle thread!
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.574969] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G W OE 4.15.0-193-generic #204-Ubuntu
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.574973] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.576224] bad: scheduling from the idle thread!
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579757] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G W OE 4.15.0-193-generic #204-Ubuntu
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579761] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579762] Call Trace:
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579765] <IRQ>
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579773] dump_stack+0x6d/0x8b
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579777] dequeue_task_idle+0x2c/0x40
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579779] deactivate_task+0x4a/0xe0
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579783] ? update_rq_clock+0x30/0x80
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579786] __schedule+0x36b/0x890
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579788] schedule+0x2c/0x80
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579789] schedule_timeout+0x1cf/0x370
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579793] ? native_write_msr+0xa/0x30
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579798] ? native_apic_msr_write+0x2b/0x40
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579802] wait_for_completion+0xba/0x140
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579806] ? wake_up_q+0x80/0x80
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579811] __wait_rcu_gp+0x134/0x160
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579819] ? reap_expired_connections+0xe0/0xe0 [drawbridge]
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579884] synchronize_sched+0x5d/0x80
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579886] ? call_rcu_bh+0x20/0x20
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579888] ? trace_raw_output_rcu_utilization+0x50/0x50
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579892] reap_expired_connections+0x8f/0xe0 [drawbridge]
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579897] reap_expired_connections_new+0x12/0x20 [drawbridge]
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579899] call_timer_fn+0x30/0x130
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579902] run_timer_softirq+0x3f3/0x430
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579904] ? kvm_clock_get_cycles+0x1e/0x20
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579906] ? ktime_get+0x43/0xb0
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579908] ? native_apic_msr_write+0x2b/0x40
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579910] ? lapic_next_event+0x20/0x30
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579947] __do_softirq+0xe4/0x2d4
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579951] irq_exit+0xc5/0xd0
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579953] smp_apic_timer_interrupt+0x79/0x140
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579955] apic_timer_interrupt+0x90/0xa0
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579957] </IRQ>
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579959] RIP: 0010:native_safe_halt+0x12/0x20
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579960] RSP: 0018:ffffa5e94069fe80 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff11
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579961] RAX: ffffffff933d03f0 RBX: 0000000000000003 RCX: 0000000000000000
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579962] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579964] RBP: ffffa5e94069fe80 R08: 000002592ad72c6c R09: ffff8cf5765a6800
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579965] R10: 0000000000000000 R11: 0000029bf8a296fb R12: 0000000000000003
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579966] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579967] ? __sched_text_end+0x1/0x1
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.579969] default_idle+0x20/0x100
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.580046] arch_cpu_idle+0x15/0x20
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.580054] default_idle_call+0x23/0x30
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.580057] do_idle+0x172/0x1f0
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.580059] cpu_startup_entry+0x73/0x80
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.580062] start_secondary+0x1ab/0x200
Sep 29 06:40:09 ubuntu-bionic kernel: [ 1986.580064] secondary_startup_64+0xa5/0xb0
...
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.733485] INFO: rcu_sched detected stalls on CPUs/tasks:
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.735500] 2-...0: (1 GPs behind) idle=c02/2/0 softirq=23576/23577 fqs=7010
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.737598] (detected by 3, t=15002 jiffies, g=9193, c=9192, q=49886)
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.739647] Sending NMI from CPU 3 to CPUs 2:
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740645] NMI backtrace for cpu 2
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740646] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G W OE 4.15.0-193-generic #204-Ubuntu
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740646] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740647] RIP: 0010:try_to_wake_up+0x9e/0x4b0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740647] RSP: 0018:ffffa01300f03948 EFLAGS: 00000002
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740648] RAX: 0000000000000001 RBX: ffffa012fcfe9700 RCX: 0000000000000000
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740648] RDX: 0000000000000001 RSI: 0000000000000003 RDI: ffffa012fcfea234
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740648] RBP: ffffa01300f039a0 R08: 0000000000000002 R09: 0000000000000000
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740649] R10: 0000000000214fe1 R11: 0000000000000001 R12: ffffa012fcfea234
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740649] R13: 0000000000000000 R14: 0000000000000046 R15: 0000000000000000
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740649] FS: 0000000000000000(0000) GS:ffffa01300f00000(0000) knlGS:0000000000000000
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740650] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740650] CR2: 00007fdf0b10d000 CR3: 0000000077a0a005 CR4: 00000000000606e0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740650] Call Trace:
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740651] <IRQ>
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740651] ? try_to_wake_up+0x59/0x4b0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740651] default_wake_function+0x12/0x20
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740651] __wake_up_common+0x73/0x130
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740652] __wake_up_locked+0x16/0x20
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740652] complete+0x42/0x60
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740652] wakeme_after_rcu+0x12/0x20
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740653] rcu_process_callbacks+0x1a7/0x4c0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740653] __do_softirq+0xe4/0x2d4
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740653] irq_exit+0xc5/0xd0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740653] smp_apic_timer_interrupt+0x79/0x140
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740654] apic_timer_interrupt+0x90/0xa0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740654] RIP: 0010:dump_stack+0x81/0x8b
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740654] RSP: 0018:ffffa01300f03c10 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff11
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740655] RAX: 0000000000000000 RBX: 0000000000000286 RCX: ffffab4700697f01
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740655] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000286
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740656] RBP: ffffa01300f03c20 R08: ffffab4700697f48 R09: 0000000000000004
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740656] R10: ffffffffbac06a40 R11: 0000000000000001 R12: 0000000000000000
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740656] R13: ffffa012fcfe9700 R14: ffffa012fcfea0c8 R15: ffffa01300f03e10
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740656] dequeue_task_idle+0x2c/0x40
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740657] deactivate_task+0x4a/0xe0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740657] ? update_rq_clock+0x30/0x80
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740657] __schedule+0x36b/0x890
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740657] schedule+0x2c/0x80
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740658] schedule_timeout+0x1cf/0x370
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740658] wait_for_completion+0xba/0x140
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740658] ? wake_up_q+0x80/0x80
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740658] __wait_rcu_gp+0x134/0x160
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740659] ? reap_expired_connections+0xe0/0xe0 [drawbridge]
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740659] synchronize_sched+0x5d/0x80
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740659] ? call_rcu_bh+0x20/0x20
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740659] ? trace_raw_output_rcu_utilization+0x50/0x50
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740660] reap_expired_connections+0x8f/0xe0 [drawbridge]
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740660] reap_expired_connections_new+0x12/0x20 [drawbridge]
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740660] call_timer_fn+0x30/0x130
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740660] run_timer_softirq+0x3f3/0x430
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740661] ? kvm_clock_get_cycles+0x1e/0x20
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740661] ? ktime_get+0x43/0xb0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740661] ? native_apic_msr_write+0x2b/0x40
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740662] ? lapic_next_event+0x20/0x30
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740662] __do_softirq+0xe4/0x2d4
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740662] irq_exit+0xc5/0xd0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740662] smp_apic_timer_interrupt+0x79/0x140
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740662] apic_timer_interrupt+0x90/0xa0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740663] </IRQ>
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740663] RIP: 0010:native_safe_halt+0x12/0x20
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740663] RSP: 0018:ffffab4700697e80 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff11
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740664] RAX: ffffffffba1d03f0 RBX: 0000000000000002 RCX: 0000000000000000
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740664] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740664] RBP: ffffab4700697e80 R08: 0000045c0e97cb24 R09: ffffab4700e97e80
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740665] R10: 0000000000000000 R11: 000004283b35e7fb R12: 0000000000000002
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740665] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740665] ? __sched_text_end+0x1/0x1
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740666] default_idle+0x20/0x100
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740666] arch_cpu_idle+0x15/0x20
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740666] default_idle_call+0x23/0x30
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740666] do_idle+0x172/0x1f0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740667] cpu_startup_entry+0x73/0x80
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740667] start_secondary+0x1ab/0x200
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740667] secondary_startup_64+0xa5/0xb0
Sep 29 07:55:00 ubuntu-bionic kernel: [ 3751.740667] Code: 5b 41 5c 41 5d 41 5e 41 5f 5d c3 0f 1f 44 00 00 44 8b 43 3c 8b 43 5c 85 c0 0f 85 c5 01 00 00 8b 43 38 85 c0 74 09 f3 90 8b 43 38 <85> c0 75 f7 48 8b 53 10 31 c0 83 e2 02 74 15 f6 43 26 01 75 0f
In Linux 5.9+, the sock_setsockopt()
method now takes a sockptr_t
as an argument.
int sock_setsockopt(struct socket *sock, int level, int op, sockptr_t optval, unsigned int optlen);
Vs in 5.8:
int sock_setsockopt(struct socket *sock, int level, int op, char __user *optval, unsigned int optlen);
I'm currently developing a kernel module where I'm performing RSA signature verification. I found your answer on stackoverflow.
The public_key always fails at init_keys, dmesg just prints: [!] Could not set the public key. Does dmesg mean the public_key is wrong? How to set public_key in kernel module ? Can you help me out?
Here is my public key:
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPdPMzEYirodOYw/GoLyFUo547OBHm3O9/KpF6yoW9lqiDHGUF4Hs5pk/tTElSMh2o5wtM1zuehmJHtetnoV16Sko4Fx6C0VXxUqJyg8twKvC4Cj/nmFK4ARayn5AaJRhvIMq560mfh2UotyIL6Zsi+f9Z8usuDP8MWyhM9nZGQIDAQAB
-----END PUBLIC KEY-----
Thanks!
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<ffffffff8184b879>] wait_for_completion+0x89/0x140
PGD 0
Oops: 0002 [#1] SMP
Modules linked in: nfnetlink_queue nfnetlink_log nfnetlink knock(OE-) x_tables vboxsf isofs ppdev binfmt_misc input_leds serio_raw vboxguest video parport_pc parport ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd mptspi scsi_transport_spi mptscsih psmouse mptbase e1000
CPU: 1 PID: 6141 Comm: rmmod Tainted: G OE 4.4.0-116-generic #140-Ubuntu
Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
task: ffff880036fd2a00 ti: ffff88003c6c8000 task.ti: ffff88003c6c8000
RIP: 0010:[<ffffffff8184b879>] [<ffffffff8184b879>] wait_for_completion+0x89/0x140
RSP: 0018:ffff88003c6cbe60 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 7fffffffffffffff RCX: ffff88003c3bff10
RDX: ffff88003c6cbe78 RSI: 0000000000000246 RDI: ffff88003c3bff08
RBP: ffff88003c6cbeb0 R08: ffff88003fd172c0 R09: 0000000000000001
R10: 8080808080808080 R11: 0000000000000000 R12: ffff88003c3bff08
R13: ffff88003c3bff00 R14: ffff880036fd2a00 R15: 000055781ab391f0
FS: 00007f8f16416700(0000) GS:ffff88003fd00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000003c5ba000 CR4: 0000000000040670
Stack:
0000000000000001 ffff880036fd2a00 ffffffff810aec00 ffff88003c3bff10
0000000000000000 1d91d778aa78ca11 ffff88003c3bff00 ffff88003c3aaa00
00007ffe04206948 0000000000000000 ffff88003c6cbed8 ffffffff810a340f
Call Trace:
[<ffffffff810aec00>] ? wake_up_q+0x70/0x70
[<ffffffff810a340f>] kthread_stop+0x4f/0x110
[<ffffffffc029c158>] knock_xt_exit+0x23/0xecb [knock]
[<ffffffff8110b358>] SyS_delete_module+0x1b8/0x210
[<ffffffff8184efc8>] entry_SYSCALL_64_fastpath+0x1c/0xbb
Code: 81 48 bb ff ff ff ff ff ff ff 7f 65 4c 8b 34 25 00 fc 00 00 c7 45 b0 01 00 00 00 4c 89 75 b8 49 89 55 18 48 89 4d c8 48 89 45 d0 <48> 89 10 eb 05 48 85 db 74 33 49 c7 06 02 00 00 00 4c 89 e7 ff
RIP [<ffffffff8184b879>] wait_for_completion+0x89/0x140
RSP <ffff88003c6cbe60>
CR2: 0000000000000000
---[ end trace fafbcc210cfe745e ]---
I get the following error in dmesg while trying out drawbridge from the latest master (commit 99376d4) on Arch Linux using the distro provided 6.0.6 package.
Command:
insmod drawbridge.ko ports=22,445
dmesg output:
[-] Could not attach bpf zero filter to socket -12
[-] drawbridge: Unable to setup child thread
I added a few printk's and it seems like the failure is coming from the refcount check in db_sk_filter_charge
.
Is there anything I can do to help debug?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.