Thursday, December 17, 2020

UTF-8 : Where Ινδία is bigger than India

A peculiar problem was once reported by a customer of our data storage product.
They were copying files from a Netapp solution to their newly setup IBM Storwize V7000 Unified system.
Many files were having names with Greek characters in them.  Some of those had really long names.
Files whose names were Greek and longer than 125 characters failed to copy.
Being the Linux flag bearer, the issue came my way.

My investigation involved checking all the possibilities of where the issue could be.  I wanted to check all the possibilities.  Robocopy, the tool used for copying the files.  Samba, the protocol used for copying the files.  The locale being used at the Unified system.  Since we use RHEL in IBM Storwize V7000 Unified system, I had opened a dialogue with Red Hat as well.

Investigation converged to the limit of file names as defined by the operating system in use, Linux, and file system in use, GPFS.  255 bytes was the limit in case of both.  In case of Linux, this came from NAME_MAX macro in limits.h header.

     #define NAME_MAX         255    /* # chars in a file name */

RHEL and GPFS both were using UTF-8 encoding for file names.  UTF-8 requires 2 bytes for storing one Greek character.  Hence files whose names were longer than 125 Greek characters were failing to copy.

 

Someday I want to do this experiment.  Update the NAME_MAX macro in limits.h and recompile, so that files having longer names could see light of the day.

What is noquery in NTP configuration file

Sometime last year, a security vulnerability was reported at a system that acts as NTP server.  After investigation, I found that the system in question was not having noquery in its NTP configuration file /etc/ntp.conf and this resulted in the security vulnerability.  This was probably found by doing a vulnerability scan of the system using Nessus or OpenVAS or something similar.

As a mitigation, I suggested to add noquery in the NTP configuration file and then restart NTP service, so that update to the NTP configuration file comes into effect.


What is this noquery and what is the necessity to have it?

In the NTP configuration file, noquery is a flag that could be used along with restrict command.  When this flag is added to the restrict command, all NTP mode 6 and 7 packets are ignored from the specified source.  In other words, ntpq and ntpdc queries are denied from the specified source.
In absence of noquery flag, that is, if ntpq and ntpdc queries are allowed, then NTP server status information (such as OS and ntpd version) could be identified by doing a scan of the system using Nessus.  This open channel that could be used for revealing system information is reported as a security vulnerability.


So, whether to have noquery flag or not depends on the decision - do we want to allow others to see our server status information?
If answer is yes, then do not have noquery flag along with the restrict command.
If answer is no, then do have the noquery flag.

noquery flag does not affect time service of the NTP server.


Please be aware, the UDP nature of NTP makes NTP servers prone to be abused in case of reflection and amplification attacks.

Friday, September 4, 2020

शाळा आणि शिक्षण


जपान संदर्भात काही फोटो कुणीतरी कधीतरी इंटरनेट वर टाकलेत.  मधेच कुठूनतरी ते समोर येतात.  त्यातला एक हा फोटो, तिथल्या एका शाळेतला.  छोटी मुलं शाळेची साफसफाई करतायत.  शाळा धुऊन पुसून स्वच्छ करतायत.  का?  कशासाठी?  शाळेला सफाई कर्मचारी ठेवता येत नाहीत?  लहान मुलांना शाळेत ह्यासाठी पाठवतात?  शिकण्यासाठी, का शाळेची सफाई करण्यासाठी?  

दादौ, जरा अर्धा मिनिट थांबून शिक्षण म्हणजे काय हा विचार केला तर?  फाडफाड इंग्रजी बोलायला शिकणं म्हणजे शिक्षण का?  वयाच्या पाचव्या वर्षी नायट्रोजन सायकल, फोटोसिन्थेसिस, आणि ह्यासारख्या टॉपिक वर पोपटासारखं बोलणं म्हणजे शिक्षण का?

इंग्रजी डिक्शनरी उघडून बघितली तर education हा शब्द आलाय एका लॅटिन शब्दावरून, ज्याचा अर्थ आहे “a breeding, bringing up, rearing”.  पुढे बघितले तर education ह्या शब्दाचे दोन अर्थ दिलेत, उदाहरणासकट.

1. (uncountable) The process of imparting knowledge, skill and judgment.
    Good education is essential for a well-run society.

2. (countable) Facts, skills and ideas that have been learned, either formally or informally.
    He has had a classical education.

शिक्षण, एक आहे मोजता येणारं, आणि दुसरं मोजता न येणारं.  फक्त मोजता येणाऱ्यावरच भर दिला, आणि मोजता न येणाऱ्याकडे दुर्लक्ष केलं, कि काय होईल?  त्यात पण, आज knowledge आणि information ह्याची गल्लत झालीये.  आपण ज्याला knowledge समजतोय ते खरंच knowledge आहे, का information आहे, हे बघतोय का आपण?  आज आपण आपल्या मुलांना जे शिक्षण देतोय त्यातूनच त्यांची वाढ होणार आहे ना?  मग असं शिक्षण घेऊन पुढे गेल्यावर काय होतं?  बघायचंय? 

 

वय वाढत गेलंय, बॅंकेतला बॅलन्स वयानुसार वाढत गेलाय.  पोष्टाने पत्र पाठवून ख्यालीखुशाली विचारण्याचे दिवस संपलेत.  लँडलाईन फोन, बटणाचा मोबाईल फोन, स्मार्टफोन, असं करता करता आयफोन हातात आलाय.  पण कचरा सार्वजनिक ठिकाणी टाकायचा नाही हे कुणी कधी शिकवलं नाहीये.  त्यामुळे पोस्ट ऑफिस मधे येऊन लाख दोन लाखाची सेव्हिंग केल्यावर कचरा तिथेच टाकून आम्ही पुढे निघालो.  आम्हाला कधी कोणी शिकवलंच नाही सार्वजनिक मालमत्तेची काळजी घ्यायला.  आम्ही फक्त गांधी नेहरू कुटुंबाच्या सनावळ्या पाठ केल्या.  

आता परत एकदा वरचा त्या जपानी शाळेतला फोटो बघा.  नव्याने काही दिसतंय?  वयानुसार अक्कल, समज वाढत जाते हा खोटेपणा आहे.  आणि साठाव्या वर्षी कोणाला अक्कल शिकवणं फार अवघड असतं.  म्हणून लहान वयातच हे शिक्षण देणं गरजेचं असतं.