[SECURITY ADVISORY] Bulletin ID: QSA-21-02

Introduce yourself to us and other members here, or share your own product reviews, suggestions, and tips and tricks of using QNAP products.
Post Reply
User avatar
Toxic17
Ask me anything
Posts: 6477
Joined: Tue Jan 25, 2011 11:41 pm
Location: Planet Earth
Contact:

[SECURITY ADVISORY] Bulletin ID: QSA-21-02

Post by Toxic17 »

QNAP Security Advisory | Bulletin ID: QSA-21-02

Taipei, Taiwan, January 28, 2021 - QNAP® had published security enhancement against security vulnerabilities that could affect specific versions of QNAP products.
Please use the following information and solutions to correct the security issues and vulnerabilities.

Heap-Based Buffer Overflow in Sudo (Baron Samedit)
Release date: January 28, 2021
Security ID: QSA-21-02
Severity rating: Medium
CVE identifier: CVE-2021-3156
Affected products: All QNAP NAS

Summary

The Qualys research team has reported a heap-based buffer overflow vulnerability in sudo, an important utility for Unix-like and Linux-based operating systems, including QTS, QuTS hero, and QES from QNAP. 
If exploited, this vulnerability allows any unprivileged users to gain escalated root privileges on the vulnerable host.  
QNAP is thoroughly investigating the case. We will release security updates and provide further information as soon as possible.

Recommendation

To secure your device, we recommend disabling SSH and Telnet whenever you are not using these services.
Disabling SSH and Telnet Connections in QTS or QuTS hero
  1. Log on to QTS or QuTS hero as administrator.
  2. Go to Control Panel > Network & File Services > Telnet/SSH.
  3. Deselect Allow Telnet connection.
  4. Deselect Allow SSH connection.
  5. Click Apply.
Disabling SSH Connections in QES
  1. Log on to QES as administrator.
  2. Go to Control Panel > Network & File Services > SSH.
  3. Deselect Allow SSH connection.
  4. Click Apply.
 
Revision History: V1.0 (January 28, 2021) - Published
 
If you have any questions regarding this issue, please contact us at https://www.qnap.com/go/support-ticket/.
Regards Simon

Qnap Downloads
MyQNap.Org Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following


NAS: TS-673A QuTS hero h5.1.2.2534 • TS-121 4.3.3.2420 • APC Back-UPS ES 700G
Network: VM Hub3: 500/50 • UniFi UDM Pro: 3.2.9 • UniFi Network Controller: 8.0.28
USW-Aggregation: 6.6.61 • US-16-150W: 6.6.61 • 2x USW Mini Flex 2.0.0 • UniFi AC Pro 6.6.62 • UniFi U6-LR 6.6.62
UniFi Protect: 2.11.21/8TB Skyhawk AI • 3x G3 Instants: 4.69.55 • UniFi G3 Flex: 4.69.55 • UniFi G5 Flex: 4.69.55
User avatar
OneCD
Guru
Posts: 12143
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SECURITY ADVISORY] Bulletin ID: QSA-21-02

Post by OneCD »

Hmm, QNAP were surprisingly fast with this one. :D

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
Toxic17
Ask me anything
Posts: 6477
Joined: Tue Jan 25, 2011 11:41 pm
Location: Planet Earth
Contact:

Re: [SECURITY ADVISORY] Bulletin ID: QSA-21-02

Post by Toxic17 »

OneCD wrote: Thu Jan 28, 2021 3:58 pm Hmm, QNAP were surprisingly fast with this one. :D
I wonder how long it takes them to patch it however.
Regards Simon

Qnap Downloads
MyQNap.Org Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following


NAS: TS-673A QuTS hero h5.1.2.2534 • TS-121 4.3.3.2420 • APC Back-UPS ES 700G
Network: VM Hub3: 500/50 • UniFi UDM Pro: 3.2.9 • UniFi Network Controller: 8.0.28
USW-Aggregation: 6.6.61 • US-16-150W: 6.6.61 • 2x USW Mini Flex 2.0.0 • UniFi AC Pro 6.6.62 • UniFi U6-LR 6.6.62
UniFi Protect: 2.11.21/8TB Skyhawk AI • 3x G3 Instants: 4.69.55 • UniFi G3 Flex: 4.69.55 • UniFi G5 Flex: 4.69.55
ldir-EDB0
Getting the hang of things
Posts: 71
Joined: Tue Dec 04, 2018 12:22 am

Re: [SECURITY ADVISORY] Bulletin ID: QSA-21-02

Post by ldir-EDB0 »

Hmmm, "QNAP is thoroughly investigating the case." - nothing to investigate, it's vulnerable, simple as!

I don't see 'switching off telnet(!) and ssh' as thorough as it should be. All it needs is a command injection vulnerability in another package, make the injected command 'sudo' and instant root.

At least until sudo is fixed my advice would be 'do NOT expose your NAS in ANY way to the Internet' and be suspicious of users on your lan.

And while you're there Qnap, better fix dnsmasq's dnspooq vuln as well.
User avatar
Ericnepean
Know my way around
Posts: 133
Joined: Mon Jul 02, 2012 4:35 pm

Re: [SECURITY ADVISORY] Bulletin ID: QSA-21-02

Post by Ericnepean »

I don't see that disabling SSH is a significant or useful action. AFAIK, with SSH you can only log in as admin. If you have logged in as admin, you can already use Sudo to exercise root privileges. There seems little point in privilege escalation.
Same for Telnet (although I do not use it).

I see ldir-EDB0's comment as more to the point.
Eric in Ottawa, Canada
TS-251A with 2x 6TB Seagate IronWolf in RAID 1
TR-004 with 4x 4TB HGST in RAID 5
DS923+ with 4x10GB WD Red in RAID 5
Mousetick
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: [SECURITY ADVISORY] Bulletin ID: QSA-21-02

Post by Mousetick »

Ericnepean wrote: Fri Jan 29, 2021 12:07 am I don't see that disabling SSH is a significant or useful action. AFAIK, with SSH you can only log in as admin. If you have logged in as admin, you can already use Sudo to exercise root privileges. There seems little point in privilege escalation.
1) The admin user doesn't even need to use sudo to obtain root privileges. The admin user is root.
2) QTS provides an option to allow members of the administrators group to log in via SSH. These users are regular users not allowed to use sudo. They could obtain root privileges by exploiting the sudo vulnerability. So disabling SSH altogether would close that particular loophole.

QNAP could instead have advised to not allow any user other than admin to log in via SSH while keeping SSH enabled.

But disabling Telnet and SSH altogether is fine too. The way these services are configured by QNAP makes them giant loopholes. It should not be possible to log in as admin/root with password authentication via the network. It's just basic security.
ldir-EDB0
Getting the hang of things
Posts: 71
Joined: Tue Dec 04, 2018 12:22 am

Re: [SECURITY ADVISORY] Bulletin ID: QSA-21-02

Post by ldir-EDB0 »

It looks like firmware 4.5.2.1566 patched the problem. sudo --version reports 1.9.5p2

This is good news.
Post Reply

Return to “Users' Corner”