RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1765199 - SCARD_INSUFFICIENT_BUFFER error when connecting to Windows 10 system
Summary: SCARD_INSUFFICIENT_BUFFER error when connecting to Windows 10 system
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: freerdp
Version: 7.7
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Ondrej Holy
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1803054 1818718
TreeView+ depends on / blocked
 
Reported: 2019-10-24 14:00 UTC by Andrew Mike
Modified: 2023-09-07 20:51 UTC (History)
8 users (show)

Fixed In Version: freerdp-2.0.0-2.rc4.el7_8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1803054 1818718 (view as bug list)
Environment:
Last Closed: 2020-05-12 18:48:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github FreeRDP FreeRDP issues 4743 0 'None' closed SCARD_INSUFFICIENT_BUFFER error 2020-11-12 17:34:04 UTC
Github FreeRDP FreeRDP issues 5791 0 None closed SCardListReadersW failed with error -2146435043 2020-11-12 17:33:43 UTC
Github FreeRDP FreeRDP pull 5499 0 'None' closed fix [channels/smartcard]: fix StatusW_Call 2020-11-12 17:33:45 UTC
Red Hat Knowledge Base (Solution) 4771141 0 None None None 2020-01-27 20:59:21 UTC

Description Andrew Mike 2019-10-24 14:00:58 UTC
Description of problem: When connecting to a Windows 10 system with smartcard authentication, it fails to connect with an error.


Version-Release number of selected component (if applicable):
2.0.0-rc4.el7.x86_64


How reproducible: Consistently.


Steps to Reproduce:
1. Configure the system for smartcard authentication.
2. Run the command "/usr/bin/xfreerdp -g 2555x1565 --plugin cliprdr --plugin rdpsnd --no-nla --rfx --plugin rdpdr --data scard: --  $REMOTE_HOST"

Actual results: Connection fails with the following errors:

==============================================================
[WARN][com.freerdp.channels.smartcard.client] - IRP failure: SCardStatusW (0x000900CC), status: SCARD_E_INSUFFICIENT_BUFFER (0x80100008)
[WARN][com.freerdp.channels.smartcard.client] - IRP failure: SCardStatusW (0x000900CC), status: SCARD_E_INSUFFICIENT_BUFFER (0x80100008)
[WARN][com.freerdp.channels.smartcard.client] - IRP failure: SCardGetStatusChangeW (0x000900A4), status: SCARD_F_COMM_ERROR (0x80100013)
[ERROR][com.freerdp.channels.smartcard.client] - SCardReleaseContext failed with error -2146435043
==============================================================


Expected results: Connection succeeds.

Additional info:
- Reverting to version 1.0.2-15.el7_6.1 seems to work properly.
- This appears to be a bug upstream (linked to the ticket).
- There also appears to be a patch upstream: https://github.com/FreeRDP/FreeRDP/pull/5499

Comment 3 Ondrej Holy 2019-10-24 14:15:16 UTC
Just a note that there is a similar Bug 1722311, but it is for RHEL 7.6, so it is not duplicate.

Comment 15 agilmore 2019-12-12 16:48:19 UTC
I had to downgrade back to freerdp 1.0.2 to get back this functionality to Server 2012. Please continue to assist upstream in fixing this. 

In August, 2016, I built a freerdp versioned 2.0.0-5.git.b02943a that works fine in RHEL6, if that helps at all. 

I'll bring up a bug mentioned upstream. Fixing the issue where the Linux clients don't trigger the smart card manager service to start in Windows would be awesome. We currently run a scheduled task to restart it every minute. If it's related to this bug, please fix both!

This regression was unpleasant to deal with. The upgrade was also not mentioned in the 7.7 release notes.

This has my customer vote!

Comment 18 Ondrej Holy 2019-12-19 08:15:07 UTC
(In reply to agilmore from comment #15)
> I had to downgrade back to freerdp 1.0.2 to get back this functionality to
> Server 2012. Please continue to assist upstream in fixing this. 

I'm sorry about it, but we are working on it. It is confirmed that https://github.com/FreeRDP/FreeRDP/pull/5499 fixes the SCARD_INSUFFICIENT_BUFFER errors and restore the functionality, but still, SCardListReadersW errors are reported (https://github.com/FreeRDP/FreeRDP/issues/5791), although it seemingly doesn't affect functionality. We are trying to figure out why.

> In August, 2016, I built a freerdp versioned 2.0.0-5.git.b02943a that works
> fine in RHEL6, if that helps at all. 
> 
> I'll bring up a bug mentioned upstream. Fixing the issue where the Linux
> clients don't trigger the smart card manager service to start in Windows
> would be awesome. We currently run a scheduled task to restart it every
> minute. If it's related to this bug, please fix both!

Also, we are currently trying to fix the autostarting of smartcard service, see https://github.com/FreeRDP/FreeRDP/pull/5793. However, we don't have a proper environment for testing right now and rely on feedback. If you are willing to help, support team can you provide testing builds, or alternatively you can try building freerdp master yourself. Thanks for understanding.

Comment 19 agilmore 2019-12-23 20:19:03 UTC
The test build I got from the support case fixed the main issue that smart card auth no longer worked.

I might be able to check on the smart card redirect/service autostart thing given test builds. Looks like the upstream jenkins has RPM builds https://ci.freerdp.com/job/freerdp-nightly-rpm-mock/ but they probably won't install in RHEL7.

Andrew

Comment 21 Ondrej Holy 2020-01-08 08:35:19 UTC
(In reply to agilmore from comment #19)
> ...
> I might be able to check on the smart card redirect/service autostart thing
> given test builds. Looks like the upstream jenkins has RPM builds
> https://ci.freerdp.com/job/freerdp-nightly-rpm-mock/ but they probably won't
> install in RHEL7.

Thanks. I haven't tested those builds on RHEL 7, but we have already feedback for https://github.com/FreeRDP/FreeRDP/pull/5793 from other people and it causes some undocumented behavior for them, unfortunately.

Comment 22 Ondrej Holy 2020-01-08 08:46:34 UTC
It is confirmed that https://github.com/FreeRDP/FreeRDP/pull/5499 fixes SCARD_INSUFFICIENT_BUFFER error, so I would suggest using this report to fix only this issue as it caused regression after rebasing to 2.0-rc4.

The problem with autostarting smartcard service on the server is not a regression as it never worked with freerdp and it is pretty unclear what needs to be done to fix it. So I would suggest using Bug 1722311 for it to not block fixing the SCARD_INSUFFICIENT_BUFFER errors. Fortunately, the server-side workaround exists.

Comment 25 agilmore 2020-01-21 18:29:53 UTC
This bug is about the regression. I understand the lack of autostart is a separate issue. I would appreciate this bugfix getting into an errata.


Note You need to log in before you can comment on or make changes to this bug.