Skip to content

Invalid memory reads and leaks #2382

Open

Description

Expected behaviour

Desktop client should not use invalid memory and should have not leaks, but it have some.
Nextcloud doesn't crash, but later invalid memory usage may be cause of crashes and undefined behaviors

Steps to reproduce

  1. Open Nextcloud in Valgrind - valgrind --leak-check=full --num-callers=50 nextcloud or compile it with address sanitizer support
  2. Connect account to server

Client configuration

Client version: 3.0.1 PPA

Operating system: Ubuntu 20.04

OS language: PL

Installation path of client: Default

Server configuration

Nextcloud version: 19.0.2

Logs

Invalid Read Example

Invalid read of size 16
   at 0x2490D978: ???
   by 0x22F8E243: ???
 Address 0x22f8e2be is 222 bytes inside a block of size 228 alloc'd
   at 0x4A37ECB: malloc (vg_replace_malloc.c:307)
   by 0x108EE240: QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.12.8)
   by 0x10963AD6: QString::QString(int, Qt::Initialization) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.12.8)
   by 0x1097476B: QString::multiArg(int, QString const**) const (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.12.8)
   by 0x1ECAFD: OCC::AccountSettings::slotAccountStateChanged() (in /usr/bin/nextcloud)
   by 0x1EEE8D: OCC::AccountSettings::AccountSettings(OCC::AccountState*, QWidget*) (in /usr/bin/nextcloud)
   by 0x2691BC: OCC::SettingsDialog::accountAdded(OCC::AccountState*) (in /usr/bin/nextcloud)
   by 0x26A7B7: OCC::SettingsDialog::SettingsDialog(OCC::ownCloudGui*, QWidget*) (in /usr/bin/nextcloud)
   by 0x250F80: OCC::ownCloudGui::ownCloudGui(OCC::Application*) (in /usr/bin/nextcloud)
   by 0x1FA2B7: OCC::Application::Application(int&, char**) (in /usr/bin/nextcloud)
   by 0x1C81FD: main (in /usr/bin/nextcloud)

Full log
valgrind.txt

  1. Client logfile:
    log.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions