Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel: RTL8139 runs into RX buffer overflow #10198

Closed
supercomputer7 opened this issue Sep 24, 2021 · 3 comments
Closed

Kernel: RTL8139 runs into RX buffer overflow #10198

supercomputer7 opened this issue Sep 24, 2021 · 3 comments
Labels
bug Something isn't working regression

Comments

@supercomputer7
Copy link
Member

How to reproduce:

  1. Change run.sh to use rtl8139 instead of e1000 as the network adapter.
  2. Run the script, open the browser.
  3. Try to navigate to http://serenityos.org/.

There should be a bunch of RX buffer overflow being indicated in the debug log.

@vkoskiv
Copy link
Contributor

vkoskiv commented Oct 13, 2021

FWIW, setting the network adapter to that just throws up a kernel panic on boot for me:

[#0 init_stage2(1:1)]: BIOSSysFSDirectory: SMBIOS 32bit Entry point @ P00000000000f5ab0
[#0 init_stage2(1:1)]: BIOSSysFSDirectory: Data table @ P00000000000f5ad0
[#0 init_stage2(1:1)]: VirtIOConsole: Found @ PCI [0000:00:03:00]
[#0 init_stage2(1:1)]: Trying to unregister unused handler (?)
[#0 init_stage2(1:1)]: VirtIO::Console: cols: 0, rows: 0, max nr ports 2
[#0 init_stage2(1:1)]: VirtIORNG: Found @ PCI [0000:00:04:00]
[init_stage2(1:1)]: ASSERTION FAILED: m_ptr
[init_stage2(1:1)]: ../.././AK/NonnullOwnPtr.h:44 in AK::NonnullOwnPtr<T>::NonnullOwnPtr(AK::NonnullOwnPtr<T>&&) [with T = Kernel::KString]
[init_stage2(1:1)]: KERNEL PANIC! :^(
[init_stage2(1:1)]: Aborted
[init_stage2(1:1)]: at ../../Kernel/Arch/x86/common/CPU.cpp:35 in void abort()

@supercomputer7
Copy link
Member Author

FWIW, setting the network adapter to that just throws up a kernel panic on boot for me:

[#0 init_stage2(1:1)]: BIOSSysFSDirectory: SMBIOS 32bit Entry point @ P00000000000f5ab0
[#0 init_stage2(1:1)]: BIOSSysFSDirectory: Data table @ P00000000000f5ad0
[#0 init_stage2(1:1)]: VirtIOConsole: Found @ PCI [0000:00:03:00]
[#0 init_stage2(1:1)]: Trying to unregister unused handler (?)
[#0 init_stage2(1:1)]: VirtIO::Console: cols: 0, rows: 0, max nr ports 2
[#0 init_stage2(1:1)]: VirtIORNG: Found @ PCI [0000:00:04:00]
[init_stage2(1:1)]: ASSERTION FAILED: m_ptr
[init_stage2(1:1)]: ../.././AK/NonnullOwnPtr.h:44 in AK::NonnullOwnPtr<T>::NonnullOwnPtr(AK::NonnullOwnPtr<T>&&) [with T = Kernel::KString]
[init_stage2(1:1)]: KERNEL PANIC! :^(
[init_stage2(1:1)]: Aborted
[init_stage2(1:1)]: at ../../Kernel/Arch/x86/common/CPU.cpp:35 in void abort()

This is worrying. It worked when I opened this bug report and now I confirmed that you can't boot with rtl8139 as the primary network device.

@kleinesfilmroellchen kleinesfilmroellchen added bug Something isn't working regression labels Jan 13, 2022
supercomputer7 added a commit to supercomputer7/serenity that referenced this issue Jan 7, 2023
Nobody tests this network card, and the driver has bugs (see the issue
SerenityOS#10198 for more details),
so it's almost certain that this happened due to code being rotting when
there's simply no testing of it.

Essentially this has been determined to be dead-code so this is the most
important reason to drop this code. Another good reason to do so is
because the RTL8139 only supports Fast Ethernet connections (10/100
Megabits per second), and is considered obsolete even for bare metal
setups.
supercomputer7 added a commit to supercomputer7/serenity that referenced this issue Jan 7, 2023
Nobody tests this network card, and the driver has bugs (see the issue
SerenityOS#10198 for more details),
so it's almost certain that this happened due to code being rotting when
there's simply no testing of it.

Essentially this has been determined to be dead-code so this is the most
important reason to drop this code. Another good reason to do so is
because the RTL8139 only supports Fast Ethernet connections (10/100
Megabits per second), and is considered obsolete even for bare metal
setups.
supercomputer7 added a commit to supercomputer7/serenity that referenced this issue Jan 7, 2023
Nobody tests this network card, and the driver has bugs (see the issue
SerenityOS#10198 for more details),
so it's almost certain that this happened due to code being rotting when
there's simply no testing of it.

Essentially this has been determined to be dead-code so this is the most
important reason to drop this code. Another good reason to do so is
because the RTL8139 only supports Fast Ethernet connections (10/100
Megabits per second), and is considered obsolete even for bare metal
setups.
ADKaster pushed a commit that referenced this issue Jan 7, 2023
Nobody tests this network card, and the driver has bugs (see the issue
#10198 for more details),
so it's almost certain that this happened due to code being rotting when
there's simply no testing of it.

Essentially this has been determined to be dead-code so this is the most
important reason to drop this code. Another good reason to do so is
because the RTL8139 only supports Fast Ethernet connections (10/100
Megabits per second), and is considered obsolete even for bare metal
setups.
@supercomputer7
Copy link
Member Author

This driver is removed now, so closing this :)

mkanilsson pushed a commit to mkanilsson/serenity that referenced this issue Jan 11, 2023
Nobody tests this network card, and the driver has bugs (see the issue
SerenityOS#10198 for more details),
so it's almost certain that this happened due to code being rotting when
there's simply no testing of it.

Essentially this has been determined to be dead-code so this is the most
important reason to drop this code. Another good reason to do so is
because the RTL8139 only supports Fast Ethernet connections (10/100
Megabits per second), and is considered obsolete even for bare metal
setups.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression
Projects
None yet
Development

No branches or pull requests

3 participants